hi...
plzz help me out....
very urgent..
i need to display all the records which are stored in the database today(date)
but there is some problem ..when i do the following it says..no row at that position...........where shiftDate is a date/time column in the Bookings table
plzz help me out....
very urgent..
i need to display all the records which are stored in the database today(date)
but there is some problem ..when i do the following it says..no row at that position...........where shiftDate is a date/time column in the Bookings table
VB.NET:
Dim dt As Date = Format(Today.Date, "d")
Try
Dim da As OleDbDataAdapter = New OleDbDataAdapter("SELECT * from Bookings where ShiftDate =" + dt + "", con)
Dim ds As DataSet = New DataSet()
da.Fill(ds, "Bookings")
DataGridView1.DataSource = ds.Tables(0).DefaultView
Catch ex As Exception
MsgBox(ex.Message)
End Try