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.comwww.prenia.comWeblog: blogs.prenia.com/cathi