On Thu, Aug 1, 2013 at 6:23 PM, Stephan Beal <[email protected]> wrote:
> Hi, all, > > i'm trying to use: > > http://www.sqlite.org/capi3ref.html#sqlite3_file_control > > to create a name for a temporary file, as described here: > > http://www.sqlite.org/capi3ref.html#sqlitefcntltempfilename > That File Control was added for 3.7.16, just a few months ago. My guess is that you are linking against an older SQLite. > > And it looks like: > > #include <sqlite3.h> > #ifdef SQLITE_FCNTL_TEMPFILENAME > static int test_tmpfile_0(){ > char * tmpN = NULL; > sqlite3 * db = App.f->dbMain.dbh; > assert(db); > sqlite3_file_control(db, NULL, SQLITE_FCNTL_TEMPFILENAME, &tmpN); > MARKER(("tmpfile=[%s]\n", tmpN)); > sqlite3_free(tmpN); > return 0; > } > #endif > > (This is a debug build - assert() works here and App.f->db is used > elsewhere in the app.) > > Which outputs: > > MARKER: test.c:69:test_tmpfile_0(): tmpfile=[(null)] > > Am i misusing or misunderstanding how the TEMPFILENAME fcntl is supposed to > be used? i tried "main" and "temp" as the 2nd argument, but no difference. > > :-? > > -- > ----- stephan beal > http://wanderinghorse.net/home/stephan/ > http://gplus.to/sgbeal > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

