Yes, provided you synchronize on the busy checks.

varunkumar wrote:
so two different processes cannot  access the database at a time

John Stanton-3 wrote:

You need to handle the SQLITE_BUSY condition in your program.

varunkumar wrote:

is it possible more than one process can access the sqlite3 database at a
time?

I am using sqlite3 database , I have the situation like follows in my
project.

In my project one process(daemon) doing as follows

   it is opening the database using  sqlite3_open()
   preparing sqlite3 insert  statement using sqlite3_mprintf() for
inserting values
   using sqlite3_exec() executing the sqlite3 insert statement .
   finally calling  sqlite3_free(), sqlite3_close() API s

                 The above steps are doing in my process(daemon) for
every
one minute.

I am generating reports from different processes like

   opening the database usig sqlite3_open()
   preparing sqlite3 select statement using sqlite3_mprintf()
   using sqlite3_exec() executing the sqlite3 statement
   finally calling sqlite3_free(), sqlite3_close() APIS





problem
--------
   when i am generating reports  at particular time ,at the same time if
that daemon process access
   the database by calling sqlite3_exec() the daemon process getting the
error like
   sqlite3_exec function error:database is locked.

   using sqlite3_step() API instead of sqlite3_exec() API  verify the
database whether
  database is busy or not using return value of SQLITE_BUSY. if
SQLITE_BUSY
  i have to wait untill  database is not busy. but i donot want to wait
at
that time
  because if i wait at that time our project would  not synchronize with
other
  processes, it should insert values at that time if any processes also
using the database at
  the same time.




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------







-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to