Monday, December 11, 2006

'Common' ASP.NET 2.0 optimistic concurrency error...*

Monday, December 11, 2006 4:23:01 PM (GMT Standard Time, UTC+00:00)

There's one final property setting that needs to be made in order for the ObjectDataSource to correctly pass the original values to the dataset methods (eg. Update, Delete) The ObjectDataSource has a ConflictDetection property that can be assigned to one of two values:

* OverwriteChanges - the default value; does not send the original values to the dataset methods' original input parameters
* CompareAllValues - does send the original values to the dataset's methods; choose this option when using optimistic concurrency

Take a moment to set the ConflictDetection property to CompareAllValues. (The above is a partial excerpt from The Official Microsoft ASP.NET 2.0 Site)

..- If you don't do this you will get this exception: "System.ArgumentNullException: Value cannot be null. Parameter name: Original_(whatever the field name)" when trying to get optimistic concurrency working.

Related posts:
Select a random row in MS SQL...
Regular expressions
VS2005, ASP.NET 2 & DLLs, DLLs..
MS's ASP.NET and.. PHP
2-way databinding cascading drop down lists within a FormView
ApplicationName Property when customising providers

Tuesday, December 12, 2006 4:30:30 PM (GMT Standard Time, UTC+00:00)
Nice going with that little bit of research.
Comments are closed.