tags:

views:

300

answers:

2

I am running SQLite3 version sqlite-3.6.12 and I have successfully ported it to my OS. The problem I am seeing is that when I execute the command "PRAGMA journal_mode = OFF" it returns "OFF" but I am still seeing *.db-journal files being created. It is critical that these files are not created for the purpose of my project. When I step through the code sqlite3PagerJournalMode is returning PAGER_JOURNALMODE_OFF so I am wondering if setting journal_mode=OFF should still produce these files or if there is something else that I am missing.Please help

I also tried PRAGMA main.journal_mode = OFF and PRAGMA journal_mode = MEMORY.But the journel file is creating as such !!!!

A: 

Try to set exclusive access (PRAGMA locking_mode=exclusive), sometimes journal is created for external locking.

Mash
Thanks To respond.I already tried with this option But no differences.My version of sqlite is sqlite-3.6.12.whether the particular version has any problem?
Are you sure that you haven't broken source code?
Mash
yes.I am doing everything in my application codes only.I can set the default_cach_size(5000) through command line.but when i am setting JOURNEL mode or temporary mode as different than default,then It is not giving that values next time.But cache size is showing like the previously(5000).
A: 

Many pragmas have both temporary and permanent forms. Temporary forms affect only the current session for the duration of its lifetime. The permanent forms are stored in the database and affect every session.

http://stackoverflow.com/questions/2883527/when-to-use-pragmas-on-sqlite

Cheng