skip to content »

Radgrid not updating database

radgrid not updating database-16

However Sql Server had rounded the value to second precision, and thus entity framework was unable to find the millisecond precision value.

radgrid not updating database-6radgrid not updating database-5

Has anyone seen this or does anyone know what the error message refers to?This is happening in a single-user environment (on my dev machine) so I don't think it could be a race condition.I am binding to a custom grid control with an Entity Data Source so I'm not sure exactly what's happening behind the scenes, but I don't have any extra code of my own that is modifying the tables. I think you can on a per-column basis in your entity model (It's in the properties window), but the thing is that'll just prevent you seeing the error and it'll still not update anything.At the time you are saving the object to db, you need the previous value of the Row Version submit to the db along with the object for the concurrency check.You make silly mistakes when you need things faster!From Paul Bellora's comment I had a similar issue but with a twist.

For me the issue was I didn't have the sql table setup correctly.

Sure enough, although it ran, 0 records were affected by this query hence the error being returned by EF.

In my case the problem was caused by the Category ID.

I got that error when I was deleting some rows in the DB (in the loop), and the adding the new ones in the same table.

The solutions for me was, to dynamicaly create a new context in each loop iteration If you are trying to create mapping in your edmx file to a "function Imports", this can result this error.

My primary key field was not set to auto increment.