On 24 Sep 2015, at 10:42am, ALBERT Aur?lien <aurelien.albert at alyotech.fr> wrote:
> I need to identify which connection use the same database as another > connection. > > For the moment, I use the absolute database filename as an "unique database > identifier", and I store this information with my "sqlite3*" connection > handle. There's a PRAGMA for storing and retrieving a 'user-version' in the database: <https://www.sqlite.org/pragma.html#pragma_schema_version> It's not used by SQLite itself, you can use it to store any 32-bit signed integer. So you could store a different number to each of your databases and check to see whether the user-version of one connection is the same as that from a different connection. Simon.