in

System.Data.SQLite

An open-source, enhanced version of the SQLite database engine for Windows

DBConcurrencyException when deleting a row

Last post 03-30-2008 5:07 PM by indiekiduk. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-20-2008 6:47 AM

    • nagar
    • Top 200 Contributor
    • Joined on 02-03-2008
    • Posts 5

    DBConcurrencyException when deleting a row

    I'm getting random DBConcurrencyException messages when deleting a row. I noticed that this happens for the rows that I have recently added: this doesn't happen for each row but kind of randomly. I'm working on the main thread using the dataset and dataadapter, so there's no simultaneous update of the data.

     I'm using an untyped dataset and the update, delete and insert commands have been generated by the CommandBuilder.

    Here's the code I use for the Update

     public void UpdateClipboardHistory() {
                DataTable changes = dsAllData.Tables[TABLE_CLIPBOARD_HISTORY].GetChanges();
                if (changes != null) {
                    clipDataAdapter.Update(dsAllData.Tables[TABLE_CLIPBOARD_HISTORY]);
                }
            }

     

    Any idea of  why this happens?

    Thanks.
    Andrea 

  • 03-30-2008 5:07 PM In reply to

    • indiekiduk
    • Top 150 Contributor
    • Joined on 09-08-2006
    • Glasgow, Scotland
    • Posts 7

    Re: DBConcurrencyException when deleting a row

    I had this too but fixed it in the TableAdaptor configuration wizard, advanced options, untick use optimistic concurrency.
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems