I need to check if my SQL statement returned any results from the Access db I'm using to store my data.
I have this code atm:
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Computing Project\database.mdb;")
cn.Open()
cmd = New OleDbCommand("SELECT * FROM(" & roomvar.ToLower() & ") WHERE (((" & roomvar.ToLower() & ".date)=" & Chr(34) & dtpDate.Value.Date & Chr(34) & "))", cn)
dr = cmd.ExecuteReader
While dr.Read()
End While
End If
dr.Close()
I would like to be able to check (maybe via a boolean value or something) that this result returned a query. I'm using VB.net.
Thanks