I am using Access 2010 with a SqlServer Express 2008 with SqlServer 2008 with the SqlServer 2005 Backword Compatibility (BC) package.
My application was originately developped with an older version, so there are plenty of DateTime fields to store date or time values.
If I update a date / time values using a command similar to this, MyTime becomes "1900-01-01 11:22:33.000":
INSERT INTO [MyTable] SET MyTime = '11:22:33' WHERE ...
However, if I read my record and attempt an update with the same value in a loop of my program, MyTime becomes "1899-12-30 11:22:33.000":
Dim rst As New ADODB.RecordSet
rst.Open "SELECT * FROM [MyTable] WHERE ..."
rst.MoveFirst
While Not rst.EOF
rst!MyTime = '11:22:33'
Wend
rst.Close
How can I assign a time field using code assignment, so that the unused date part of a time if always the same value "1900-01-01"