Hi
When i run the program, i get error on the statement inside Do While Loop. The piece of code from my application is:
Object reference not set to an instance of an object
When i run the program, i get error on the statement inside Do While Loop. The piece of code from my application is:
Code:
Dim selectString As String
selectString = "Select ContactName, Address from Customers"
Dim cmd As OleDbCommand = New OleDbCommand(selectString, con)
Dim reader As OleDbDataReader
reader = cmd.ExecuteReader()
Do While reader.Read() = True
strName = reader("ContactName")
strAddress = reader("Address")
Loop
Comment