Hello Billy,
Thanks for your post.
Generally speaking, the Update method will raise a DBConcurrencyException
exception when the method encounters a row that fails to update. It seems
to me that your Update statement is based on optimistic concurrency, that
is, records are not locked for editing, and other users or processes can
modify records whenever. It will be the ase that an Update statement will
try to update a row that has been deleted or does not contain the original
values that are found in the DataSet, and thus causes the
DBConcurrencyException.
To workaround this issue, you can explicitly set the UpdateCommand for the
DataAdapter and not rely on automatic commend generation as described in
the KB aticle 308507:
HOW TO: Update a SQL Server Database by Using the SqlDataAdapter Object in
Visual C# .NET
http://support.microsoft.com/?KBID=308507
I'd also like to recommend you the MSDN article below:
Optimistic Concurrency
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconoptimisticconcurrency.asp
Please feel free to let me know if you have any problems or concerns.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.