Return The Filename For A Database Connection

Return The Filename For A Database Connection

const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);

The sqlite3_db_filename(D,N) interface returns a pointer to a filename associated with database N of connection D. The main database file has the name "main". If there is no attached database N on the database connection D, or if database N is a temporary or in-memory database, then a NULL pointer is returned.

The filename returned by this function is the output of the xFullPathname method of the VFS. In other words, the filename will be an absolute pathname, even if the filename used to open the database originally was a URI or relative pathname.

See also lists of Objects, Constants, and Functions.

SQLite is in the Public Domain.
https://sqlite.org/c3ref/db_filename.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部