Great answer, thank you very much. doug
Thursday, August 21, 2008, 3:42:12 PM, you wrote: ML> 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 >> ML> The database connection object is handled by the SQLite database engine ML> and stored in memory allocated by the database engine. ML> SQLite does not use a client-server architecture but is completely ML> contained in a library that you link with your application, thus ML> SQLite's functions run within your application process and the database ML> connection objects exist on a per-process basis. ML> Your question seems to suggest that your users might run multiple ML> instances of your application, potentially on separate machines. If that ML> holds true, there is no way to get a list of connections from SQLite ML> since those connection objects belong to separate processes potentially ML> on separate machines. You will have to use an IPC mechanism of your ML> 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