In my .NET application I have to get results from a MS Access database. I would like to add error checking to make sure a row was returned from my SELECT statement.
How can I make sure a result was returned?
Thank you.
In my .NET application I have to get results from a MS Access database. I would like to add error checking to make sure a row was returned from my SELECT statement.
How can I make sure a result was returned?
Thank you.
Dim mySelectCommand As New OleDbCommand("SELECT * FROM SomeTable")
Dim myReader As OleDbDataReader = mySelectCommand.ExecuteReader()
If Not myReader.HasRows Then
'No row has been returned'
End If