in

System.Data.SQLite

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

Database not open Error

Last post 09-17-2009 1:50 PM by Xiong. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-15-2009 4:06 AM

    • Prachi
    • Top 150 Contributor
    • Joined on 09-10-2009
    • Posts 9

    Database not open Error

    Hello, I am using shared connection in my application.When two Users try to insert data in one table one of the user gets error "Database not open" due to Unique Constraint Violated" and so due to this exception the user cannot access other tables from the database and it gives error "Database not open" and does not allow to insert record in table even does not allow to read data (SELECT statement) from other table? Only after closing and again re executing the application, it works fine for such error. How can I handle this exception ?
  • 09-15-2009 7:23 AM In reply to

    Re: Database not open Error

    How can two users share the same connection?

    I'd need to know what your insert looks like, what the table schema is, and what the exact error messages are, hopefully including the stack trace.

  • 09-17-2009 1:50 PM In reply to

    • Xiong
    • Top 500 Contributor
    • Joined on 07-24-2009
    • Posts 7

    Re: Database not open Error

     Possibly you are using the same connection among multithread. I think you need to add lock(conn) to execute the CURD operation. Thus can avoid the database lock issue.

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