in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

"Concurrent" access of DB

Last post 04-18-2008 2:48 PM by Robert Simpson. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-18-2008 4:17 AM

    • mce
    • Top 500 Contributor
    • Joined on 04-18-2008
    • Posts 4

    "Concurrent" access of DB

     I nam using ADO.net wrapper version of the SQLite, using sqlLiteAdapter to fill and update my Database.

    I have two processes with 2 threads in each of the process.

    Process A with Thread A1 reading, Thread A2 writing.

    Process B with Thread B1 reading and B2 writing.

     Thread A2 and B2 are sychronized through mutex, while thread A1 and B1 are free to read without any sync.

     From what i understand from SQLite FAQ, the above scenario should be safe.

    However, during a update of the database through sqlLiteAdapter->Update, the DB throw a "Concurrency violation:..." exception.

    Since the DB already has readerwriter locks and thus support any number of readers from the application, and only allow one writer at any one time, why the above result in concurrency violation error??

     

     

  • 04-18-2008 2:48 PM In reply to

    Re: "Concurrent" access of DB

    I'd need to see a stack trace of the error for all the threads in your process ... or to narrow down, just the stack dump of any threads happening to be in a SQLite activity.

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems