c++csqlite

Is there a way to get the database location from a sqlite3 object?


I have a bunch of sqlite db's floating around in my app (dont ask) and I need to be able to get the file location of the dbs. Is there any way of doing this by using the sqlite3 object? (I.e. not having to store the path alongside the db when the db was created)

Bonus Question: If there are more than one db attached to the sqlite3 object, how do I get the others as well (they were ATTACHed)?


Solution

  • API function: sqlite3_db_filename