On Thu, 24 Sep 2015 11:42:27 +0200, ALBERT Aur?lien <aurelien.albert at alyotech.fr> wrote:
>Hi, > >I'm using SQLite C API and my application use multiple databases, each >database having multiple connections. >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. >Is there any simpler/safer way to get a unique database identifier across >multiple connections ? (for example, if one day I need the same about >":memory:" databases, bad things are gonna to happen) >Maybe there is already a database identifier in the SQLite API and I missed it >? I think https://www.sqlite.org/pragma.html#pragma_application_id is applicable. -- Regards, Kees Nuyt