Click here to Skip to main content
15,888,461 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Extracting a single record from a SQL database Pin
Colin Angus Mackay19-Jul-07 1:54
Colin Angus Mackay19-Jul-07 1:54 
GeneralRe: Extracting a single record from a SQL database Pin
aqzman_19-Jul-07 2:10
aqzman_19-Jul-07 2:10 
AnswerRe: help Pin
kubben19-Jul-07 1:46
kubben19-Jul-07 1:46 
Jokemore meaningful subject Pin
Luc Pattyn19-Jul-07 2:43
sitebuilderLuc Pattyn19-Jul-07 2:43 
GeneralRe: more meaningful subject Pin
kubben19-Jul-07 2:51
kubben19-Jul-07 2:51 
QuestionError when connecting to Ms access database Pin
Mekong River19-Jul-07 0:34
Mekong River19-Jul-07 0:34 
AnswerRe: Error when connecting to Ms access database Pin
Dave Kreskowiak19-Jul-07 3:44
mveDave Kreskowiak19-Jul-07 3:44 
GeneralRe: Error when connecting to Ms access database Pin
Mekong River19-Jul-07 17:44
Mekong River19-Jul-07 17:44 
Hi, thank you for your comment and the previous problem are solved based on your code. But another problem is occure in the above code:

...
cmdOrgType.Connection.Open()
Dim drdResult As OleDbDataReader
drdResult = cmdOrgType.ExecuteReader()
While drdResult.Read   ' Here is the problem occure.
For colOrgType As Integer = 0 To drdResult.FieldCount - 1          lsbOrgInfo.Items.Add(drdResult(colOrgType).ToString)
Next
End While
drdResult.Close()
cmdOrgType.Connection.Close()


Here is an error message:
Variable 'drdResult' is used before it has been assigned a value. A null reference exception could result at runtime

I think that the reason of cause the problem because my table do not have any record so the data reader object could not read the value. If it is possible, could you please let me know the sample code to check whether there is an existing record in the table?

Thank in advance!!!
GeneralRe: Error when connecting to Ms access database Pin
Dave Kreskowiak20-Jul-07 2:28
mveDave Kreskowiak20-Jul-07 2:28 
GeneralRe: Error when connecting to Ms access database Pin
Mekong River22-Jul-07 15:39
Mekong River22-Jul-07 15:39 
QuestionHow To AOP IN VB.NET Pin
tomaka18-Jul-07 23:43
tomaka18-Jul-07 23:43 
AnswerRe: How To AOP IN VB.NET Pin
Dave Kreskowiak19-Jul-07 3:29
mveDave Kreskowiak19-Jul-07 3:29 
QuestionProblem on Executing application path in VB6.0 Pin
Srinivas Kaparthi18-Jul-07 23:31
Srinivas Kaparthi18-Jul-07 23:31 
AnswerRe: Problem on Executing application path in VB6.0 Pin
Navneet Hegde19-Jul-07 2:38
Navneet Hegde19-Jul-07 2:38 
GeneralRe: Problem on Executing application path in VB6.0 Pin
Srinivas Kaparthi21-Jul-07 1:02
Srinivas Kaparthi21-Jul-07 1:02 
QuestionAccess form1 from form2. Pin
KOKEMO18-Jul-07 23:23
KOKEMO18-Jul-07 23:23 
AnswerRe: Access form1 from form2. Pin
Colin Angus Mackay18-Jul-07 23:39
Colin Angus Mackay18-Jul-07 23:39 
AnswerRe: Access form1 from form2. Pin
Naji El Kotob19-Jul-07 0:07
Naji El Kotob19-Jul-07 0:07 
AnswerRe: Access form1 from form2. Pin
Dave Kreskowiak19-Jul-07 3:13
mveDave Kreskowiak19-Jul-07 3:13 
GeneralRe: Access form1 from form2. Pin
Paul Conrad19-Jul-07 9:34
professionalPaul Conrad19-Jul-07 9:34 
GeneralRe: Access form1 from form2. Pin
Dave Kreskowiak19-Jul-07 15:55
mveDave Kreskowiak19-Jul-07 15:55 
JokeRe: Access form1 from form2. Pin
Paul Conrad19-Jul-07 16:02
professionalPaul Conrad19-Jul-07 16:02 
Questioneasy way to print datagrid ? Pin
Mr.Kode18-Jul-07 23:16
Mr.Kode18-Jul-07 23:16 
AnswerRe: easy way to print datagrid ? Pin
Dave Kreskowiak19-Jul-07 3:09
mveDave Kreskowiak19-Jul-07 3:09 
AnswerRe: easy way to print datagrid ? Pin
Duncan Edwards Jones19-Jul-07 4:01
professionalDuncan Edwards Jones19-Jul-07 4:01 

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.