开发者

Saving a Date/Time Stamp from VB 2005 to MS Access

I am coding ib Visual Basic. I need to stor开发者_运维问答e the current system time in MS Access timestamp field. How do I go about it.

Dim row As DataRow = ds.Tables("StudentTable").NewRow

row("SSMA_TimeStamp") = System.DateTime.Now.ToString()


The field name starting with SSMA makes me think that his is a SQL Server table and that its been upsized from Access using the SQL Server Migration Assistant for Access If so Access isn't involved here at all.

If this is indeed the case then it's almost certainly a SQL Server TimeStamp aka RowVersion column which is not updatable by users or code. It is a special field that changes only when data in the row changes. This makes a lot less work for Access (and other programs if they use it) to see if the row has been changed elsewhere when Access goes to update the data. Read up on it in Books Online.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜