Doug Porter wrote:
Is there a way to get a list of connections that are opened on a
particular SQLite database file?
Our software uses SQLite to save our data and we want to warn a user
who opens a file that is already opened by another user. I tried a
homebrewed approach (keep a table of open connections manually), but
ran into a couple places where that won't work.
Any help would be greatly appreciated!
doug
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
The database connection object is handled by the SQLite database engine
and stored in memory allocated by the database engine.
SQLite does not use a client-server architecture but is completely
contained in a library that you link with your application, thus
SQLite's functions run within your application process and the database
connection objects exist on a per-process basis.
Your question seems to suggest that your users might run multiple
instances of your application, potentially on separate machines. If that
holds true, there is no way to get a list of connections from SQLite
since those connection objects belong to separate processes potentially
on separate machines. You will have to use an IPC mechanism of your
choice to handle communication between instances of your app.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users