DateTime not being saved in Access DB

  • Thread starter Thread starter sandman
  • Start date Start date
S

sandman

I just created a mini-app (WinForms in C#) with a bound data grid whose
data source is an Access database. It has 2 DateTime columns. I
formatted the database so one of columns was GeneralDate and the other
LongTime. If I type directly into the Access db, both columns display
fine. When I run the app, the data loads correctly. However, if I key
from the grid and call the DataAdapter's Update method, the time portion
gets set to midnight and doesn't retain the time I entered. I called
the dataset's WriteXML method and check the output and that also results
in a correct format. It seems that only the Update method screws up.
Does anybody know what's going on?


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
I generated the dataset from the data adapter and then changed the type
of the time column to Time. Other than that it's the default. The other
one is DateTime.



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Back
Top