On 25 May 2012, at 1:55am, Andrew Cherednik 
<andrew.chered...@healthscope.com.au> wrote:

> The program is a multi-user program that runs across the network in Windows 
> environment. The users constantly experience database lockout problems. I 
> suspect that it is due to the fact that the sqlite* object that has been used 
> for database updates still remains in the 'exclusive lock' mode even when the 
> program is doing normal 'selects'.

Which SQLite result code are you getting ?  Have you tried a SQLite timeout 
setting of, perhaps, three seconds ?

> I am thinking of converting the program, so that sqlite* objects are created 
> at the beginning of each 'database operation' and destroyed straight away. As 
> you can imagine, there are hundreds of lines of code that refer to the global 
> g_session object, and the task would be time consuming. Therefore, before I 
> proceed with the task, I wanted to ask what is the right way to use the 
> sqlite3* object. Is it better to use a global or a local connection object? 
> Will I add an overhead by opening and closing the database connection for 
> each database operation?

I hope a C++ programmer (which I'm not) can answer that.

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

Reply via email to