LinqDataSource - updating row with TimeStamp column

Hi,

I have a pretty standard Entity class calledUsers that contains properties such asUserId,FirstName,LastName etc and also contains aVersion property which is defined as aTimeStamp in the associated DB table.

On a web page, I have aLinqDataSource configured against it, and have enabled automatic updates, inserts & deletes.

Finally I have have aUsersGridView with theLinqDataSource as its source.

If I try to edit or delete an existing user row in the grid view, I get a message stating: "Row not found or changed"

Does theLinqDataSource supportTimeStamp properties, in relation to automatic updates, inserts & deletes?

If I drop theVersion property from myEntity class, i.e. theTimeStamp column, everything works as expected.

Anyone else seeing similar behaviour?

Thanks,

Brian.

[1327 byte] By [brianbolger] at [2008-1-8]
# 1
In the beta2 release LinqDataSource is not storing original values for Version columns, only

columns marked with IsPrimaryKey or UpdateCheck=Always or WhenChanged. This bug will be fixed in the next release. As a workaround you should be able to set UpdateCheck=Always on the timestamp column so that LDS saves the original values.

chenriks at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,LINQ Project General...
# 2

This works as expected now with the fix you suggested

Thanks for the help!

Brian.

brianbolger at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,LINQ Project General...

Visual Studio Orcas

Site Classified