Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Concurrency violation
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00963498
Message ID:
00963518
Views:
5
Hi Agnes,

This can be caused by several things. First, I would call the AcceptChanges method on your DataSet after the updates. If that doesn't fix the problem then you need to look at your command statements (update, insert, delete)used in your DataAdapter. If you are using SQL Server then you can also run the Profiler to figure out what SQL Server is receiving for the commands. Then you can try the same statement in the SQL Query Analyzer to debug the problem. After the insert update is done, your DataSet should have the same set of data that SQL Server is storing. If it doesn't then that would cause the concurrency issue you are experiencing.

>I am using Databinding manager to bind the textbox in the form.
>
>
>'New
>bmInvoice.endcurrent()
>bmInvoice.addnew()
>'Save...
>if dsInvoice.haschanges() then
>   daInvoice.update(dsInvoice,"invoicetable")
>   dsInvoice.update()
>end if
>
>'Modify
>bmInvoice.endcurrent()
>'Save.....
>if dsInvoice.haschanges() then
>   daInvoice.update(dsInvoice,"invoicetable")
>   dsInvoice.update()
>end if
>
>
>Now , I can save the record (in new mode) , however, once I modify it immedately and then save, I got 'concurrency violation ; update command affect 0 records' ?
>Please help
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform