'How to disable journal files or journal usage in sqlite3 in c programming?

I am writing a multi threaded program to store information in sqlite3 database. This is the only process writing to it. I added changes to disable journal :

sqlite3_db_config(db,SQLITE_DBCONFIG_DEFENSIVE,0,0); also

"PRAGMA main.journal_mode=off",

There is another independent process which tries to dump the db info into sql file and send to server as backup. The dumping of the db fails where there is a journal file existing. Not sure why it is creating.

Am I missing any option or giving any wrong option ?

TIA.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source