On 5/24/2012 8:55 PM, Andrew Cherednik 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'.

It that's what happens, it likely means you are forgetting to sqlite3_reset or sqlite3_finalize prepared statements after executing them.

Therefore, before I proceed with the task, I wanted to ask what is the right 
way to use the sqlite3* object.

Yes, it is perfectly fine to use a single database connection.

Will I add an overhead by opening and closing the database connection for each 
database operation?

Yes - an overhead proportional to the size of database schema. SQLite reads and parses all table definitions, triggers and such when opening a connection.
--
Igor Tandetnik

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

Reply via email to