J
Joe
Hi everyone,
I'm trying to write a parameterized query that accepts a DateTime value for
comparison against a DateTime value held in a given row in an UPDATE
operation. If the two DateTime values aren't equal, then the row is not
updated. The DateTime variable passed to the query comes from the same row
that it is later compared to (when the row is downloaded to a DataSet) - so
it should be equal.
I'm using ADO.NET and Jet 4.0
This is the query:
PARAMETERS ..... [edited date] DateTime ....;
......
WHERE editedDate = [edited date]
.......;
and the ADO stuff:
Dim query As OleDbCommand = new OleDbCommand("EXEC myProc")
query.parameters.add("editd date",date) '// date is a DateTime object
.....
query.ExecuteNonQuery()
However, the comparison always fails, even if the the two times are equal.
Any ideas?
Thanks,
Dave Hagedorn
I'm trying to write a parameterized query that accepts a DateTime value for
comparison against a DateTime value held in a given row in an UPDATE
operation. If the two DateTime values aren't equal, then the row is not
updated. The DateTime variable passed to the query comes from the same row
that it is later compared to (when the row is downloaded to a DataSet) - so
it should be equal.
I'm using ADO.NET and Jet 4.0
This is the query:
PARAMETERS ..... [edited date] DateTime ....;
......
WHERE editedDate = [edited date]
.......;
and the ADO stuff:
Dim query As OleDbCommand = new OleDbCommand("EXEC myProc")
query.parameters.add("editd date",date) '// date is a DateTime object
.....
query.ExecuteNonQuery()
However, the comparison always fails, even if the the two times are equal.
Any ideas?
Thanks,
Dave Hagedorn