Comparing two dates in .Net using Access mdb strange error..
- by Markive
SELECT * FROM Orders WHERE [DateSync] > #2010-11-10 03:11:00#
this works if you run the query from in MS Access but if you get .net to submit it like this...
Dim adapter1 As New OleDbDataAdapter
adapter1.SelectCommand = New OleDbCommand(sSQL, conn)
Dim table1 As New DataTable
connection1.Open()
Try
adapter1.Fill(table1)
Catch ex As Exception
'will error here
Finally
'conn.Close()
End Try
it throws an error....
"No value given for one or more
required parameters."
Source="Microsoft JET Database Engine"
Any help much appreciated.