如何使用LINQ to添加在SQL Server 2005时间戳值 [英] How to add Timestamp value in SQL Server 2005 by using LINQ
本文介绍了如何使用LINQ to添加在SQL Server 2005时间戳值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据库表中有一个名为作为银泰 timestamp列,我使用LINQ插入,在SQL服务器更新数据。现在,我想在我的数据库中添加时间戳值,但我不知道如何插入?
My database table have a Timestamp column named as inTime and i am using LINQ for insert, update data in SQL server. Now i want to add the timestamp value in my database but i don't know how to insert?
spaBL.attendance obj = new spaBL.attendance();
obj.FK_employeeId = 1;
obj.inTime =[what to write here??]
银泰百货是时间戳类型。
推荐答案
You cannot update a timestamp. See here. And indeed, as TomTom indicated, it doesn't contain actual time information.
这篇关于如何使用LINQ to添加在SQL Server 2005时间戳值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文