views:

94

answers:

1

I am coding ib Visual Basic. I need to store 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()

A: 

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.

Tony Toews
thnx a lot. Your answer was of great help
Peter
You're quite welcome.
Tony Toews