Last post Dec 28, 2012 08:29 PM by Decker Dong - MSFT
Dec 27, 2012 07:14 PM|chuang|LINK
In GridView, DetailsView, or FormView, I always ran into a strange problem. In the
automatically generated DeleteCommand and UpdateCommand in asp:SqlDataSource
element, the WHERE clause always includes a string 'AND ? IS NULL', and I had to
manually edit it out.
The development is on Windows XP 5.1 SP 3, Microsoft Visual Studio 2005 SP2, ASP.NET 2.0.
The target database is on a Windows Server 2008 Standard, running SQL Server 2008.
Dec 27, 2012 07:53 PM|oned_gk|LINK
try dont use optimistic concurrency
Dec 28, 2012 11:45 AM|chuang|LINK
I tried not using optimistic concurrency; now it does not have the error. However, that is because it does not compare with original values. How can I have both optimistic concurrency and correct syntax automatically generated correctly? If I don't specify
optimistic concurrency, what is the default behavior?
Dec 28, 2012 08:29 PM|Decker Dong - MSFT|LINK
If I don't specify optimistic concurrency, what is the default behavior?
If you don't specify optimistic concurrency，it will keep the current values and do to cope with the CRUD methods，this means you must have a unique key as a primary key for delete or update methods to tell the records from each other，otherwises you cannot
update or delete them.