Click here to Skip to main content
15,891,204 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: Runtime Compilation? [modified] Pin
schachmat21-Sep-06 13:00
schachmat21-Sep-06 13:00 
NewsRe: Runtime Compilation? Pin
schachmat23-Sep-06 6:18
schachmat23-Sep-06 6:18 
NewsRe: Runtime Compilation? Pin
schachmat23-Sep-06 10:06
schachmat23-Sep-06 10:06 
QuestionEventSync for lockdown in Windows XP Professional Pin
Joshua Boyle21-Sep-06 8:50
Joshua Boyle21-Sep-06 8:50 
AnswerRe: EventSync for lockdown in Windows XP Professional Pin
Dave Kreskowiak21-Sep-06 9:08
mveDave Kreskowiak21-Sep-06 9:08 
GeneralRe: EventSync for lockdown in Windows XP Professional Pin
Joshua Boyle21-Sep-06 10:28
Joshua Boyle21-Sep-06 10:28 
GeneralRe: EventSync for lockdown in Windows XP Professional Pin
Dave Kreskowiak21-Sep-06 10:40
mveDave Kreskowiak21-Sep-06 10:40 
QuestionDataRow Access Problem Pin
nlindley721-Sep-06 7:17
nlindley721-Sep-06 7:17 
I am currently getting a "NullReferenceException: object reference not set to an instance of an object" when I try to check a DataRow("columnname") to see if it is a DBNull.Value. The search works fine when you put a value the is in the DB, but when you try to search for an invalid record, it gives me the NullReferenceError. I tried to do a New DataRow, as most NullRefs i've came across stem from missing the New keyword, but it looks like thats not the right way to go. Any suggestions would be appreciated. The line of code that gives the error is "If drCustomersSearch("MortgageNumber") Is DBNull.Value Then"

SqlConnection1.Open()
SqlDataAdapter1.Fill(DsNameandAddress, "NameandAddress")
SqlConnection1.Close()

If txtSearch.Text = "" Then
MessageBox.Show("You must type in a Mortgage Number" & Chr(13) & " to Search For. Try search again.", "Missing Morgage Number", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Else

Dim dtCustomersUpdate As New DataTable
Dim drCustomersSearch As DataRow
Dim drCustomersSearchNoRow As DataRow

dtCustomersUpdate = DsNameandAddress.Tables.Item("NameandAddress")

drCustomersSearch = dtCustomersUpdate.Rows.Find(txtSearch.Text)

If drCustomersSearch("MortgageNumber") Is DBNull.Value Then
MessageBox.Show("Your entry is not a valid Mortgage number." & Chr(13) & Chr(13) & "Try search again.", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
txtSearch.Focus()
txtMortgageNumber.Text = ""

Else : txtMortgageNumber.Text = drCustomersSearch("MortgageNumber")
End If

Nathan Lindley, .NET Aficionado
AnswerRe: DataRow Access Problem Pin
Kschuler21-Sep-06 8:05
Kschuler21-Sep-06 8:05 
GeneralRe: DataRow Access Problem Pin
nlindley721-Sep-06 8:26
nlindley721-Sep-06 8:26 
GeneralRe: DataRow Access Problem Pin
Kschuler21-Sep-06 8:33
Kschuler21-Sep-06 8:33 
GeneralRe: DataRow Access Problem Pin
nlindley721-Sep-06 8:43
nlindley721-Sep-06 8:43 
GeneralRe: DataRow Access Problem Pin
Kschuler21-Sep-06 8:49
Kschuler21-Sep-06 8:49 
AnswerRe: DataRow Access Problem Pin
Dave Kreskowiak21-Sep-06 8:54
mveDave Kreskowiak21-Sep-06 8:54 
GeneralRe: DataRow Access Problem Pin
nlindley721-Sep-06 9:12
nlindley721-Sep-06 9:12 
QuestionHow I can get the text from x,y coordinates? Pin
Marco225021-Sep-06 7:09
Marco225021-Sep-06 7:09 
AnswerRe: How I can get the text from x,y coordinates? Pin
Dave Kreskowiak21-Sep-06 8:17
mveDave Kreskowiak21-Sep-06 8:17 
QuestionRe: How I can get the text from x,y coordinates? Pin
David Crow21-Sep-06 8:41
David Crow21-Sep-06 8:41 
AnswerRe: How I can get the text from x,y coordinates? Pin
Marco225021-Sep-06 8:54
Marco225021-Sep-06 8:54 
GeneralRe: How I can get the text from x,y coordinates? Pin
David Crow21-Sep-06 9:06
David Crow21-Sep-06 9:06 
QuestionHow to capture the higlighted text in axbrowser? Pin
Kenneth Villasenor21-Sep-06 5:57
Kenneth Villasenor21-Sep-06 5:57 
AnswerRe: How to capture the higlighted text in axbrowser? Pin
Dave Kreskowiak21-Sep-06 6:29
mveDave Kreskowiak21-Sep-06 6:29 
GeneralRe: How to capture the higlighted text in axbrowser? Pin
Kenneth Villasenor21-Sep-06 16:35
Kenneth Villasenor21-Sep-06 16:35 
GeneralRe: How to capture the higlighted text in axbrowser? Pin
Dave Kreskowiak22-Sep-06 2:18
mveDave Kreskowiak22-Sep-06 2:18 
QuestionParameter Field Value .NET Pin
netnest21-Sep-06 5:10
netnest21-Sep-06 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.