I just tried this line also and the journal files are still being created
here is the code I am running:
int32_t ret = sqlite3_open(filename, m_DatabaseRef);
if( ret == SQLITE_OK )
{
sqlite3_stmt* sqlStmt = NULL;
ret = sqlite3_prepare_v2(m_DatabaseRef, s_ "PRAGMA
main.journal_mode = OFF;", -1, &sqlStmt, NULL);
if( ret == SQLITE_OK )
{
sqlite3_step(sqlStmt);
const unsigned char* colValue =
sqlite3_column_text(sqlStmt, 0); <----- returns "off"
sqlite3_finalize(sqlStmt);
}
}
Anything wrong with the way I am doing this?
Thanks for the help.
>Did you set
>
> PRAGMA journal_mode = OFF;
>
>? The way I read the documentation (on a second or third close
>reading, I think), this only sets the default value for new databases
>to be attached, but doesn't affect your main connection and any
>databases that have already been attached. So what I do is
>
> PRAGMA main.journal_mode = OFF;
>
>IIRC, I needed this line to actually turn off the journals (tested
>with 3.4.x and 3.5.x versions of SQLite only, though).
>
>Cheers,
>Stefan
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users