开发者

C# tbl adapter Update() - truncation of date columns in SQLServer

开发者 https://www.devze.com 2023-03-19 16:27 出处:网络
I have a strongly typed c# dataset (.Net 4) that has a DataTable with System.DateTime columns in it.When I add rows to this DataTable and use the table adapter Update() to commit the changes to SQLSer

I have a strongly typed c# dataset (.Net 4) that has a DataTable with System.DateTime columns in it. When I add rows to this DataTable and use the table adapter Update() to commit the changes to SQLServer 2008, I get the date column values as truncated (i.e. lose the hh:mm:ss).

The database table columns are defined as datetime. I can see the contents of the DataSet in the debugger before the Update() and I see that开发者_StackOverflow full date (including hh:mm:ss).

Any thoughts anyone?

Thanks for the help.

0

精彩评论

暂无评论...
验证码 换一张
取 消