Why would a TableAdapter populate a DataSet with "1/1/2000" for an entire timestamp column?

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2009-08-14T19:31:05Z Indexed on 2010/05/05 17:48 UTC
Read the original article Hit count: 263

I have a TableAdapter filling a DataSet, and for some reason every select query populates my timestamp column with the value 1/1/2000 for every selected row.

I first verified that original values are intact on the DB side; for the most part, they are, although it seems a few rows lost their original timestamp because of update queries performed programmatically before the issue was discovered.

The DataColumn type is DateType, while the database (Postgres) column type is timestamp. Up until recently, this was all playing very nicely. I noticed the issue in a bound DataGridView control, and verified that this is not related to data binding by utilizing the 'Preview Data' option in the VS DataSet Editor.

Usually when I notice unexpected values popping up in my application it's related to a mis-configured property, type conflict, or another silly mistake I've made. So after checking properties and types, and even recreating the TableAdapter from scratch, to say I'm a little baffled is an understatement.

Does anyone have any ideas of what I could do to fix the issue and/or diagnose the cause?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about tableadapter