Dear,

http://sqlite.org/c3ref/open.html says:

"If the filename is an empty string, then a private, temporary on-disk database 
will be created. This private database will be automatically deleted as soon as 
the database connection is closed."

On such a successfully opened database, sqlite3_db_filename(db, "main") returns 
a NOT null pointer (to '\0').
The same behavior is seen when the opened database is an in-memory one (using 
":memory:" in the sqlite3_open_v2 call).

Yet http://sqlite.org/c3ref/db_filename.html says:

"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."

So I would have expected (from the documentation) to get a NULL pointer, at 
least for the :memory: database. And for the on-disk but private temporary one, 
the documentation is mute about what to except from sqlite3_db_filename().

Could it be that schema name to pass to sqlite3_db_filename() would not be 
"main" in case of a ":memory:" database or "" temporary database ?

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to