We are usually in situation that two processes requiring database access
work at the same time. Any of them can impose implicit lock updating
database. Does it mean that in such scenario we must use
sqlite3_busy_timeout() in front of each database access  call to manage a
better way concurrent work? 

 

Dusan Gibarac

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 23, 2008 9:45 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] May one software write to the SQLite database while a
other read the same SQLite database ?

 

Pierre8r <[EMAIL PROTECTED]> wrote:

> Hello,

> 

> One SQLite database on my PC.

> Two softwares.

> May one software write to the SQLite database while a other read the 

> same SQLite database  ?

> 

 

Your programs cannot be reading and writing at exactly the

same instant in time.  But both programs can have the database

open for reading and writing.  While one program is writing,

the other is blocked from reading.  But the write normally 

only takes a few dozen milliseconds.  Surely your reader can

wait that long.

 

The waiting is handled for you automatically if you set

 

    sqlite3_busy_timeout()

 

--

D. Richard Hipp <[EMAIL PROTECTED]>

 

 

----------------------------------------------------------------------------
-

To unsubscribe, send email to [EMAIL PROTECTED]

----------------------------------------------------------------------------
-

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to