Android Question SQL Journal Files


Licensed User
Longtime User
Hello all,
A quick question on SQL -journal files. I have a program that uses very large SQL databases and have noticed some strange behaviors. First off, I have enveloped every block of code that contains one or more SQL.ExecNonQuery and SQL.ExecNonQuery2 command within a "Begin Transaction" and a "Transaction Successful/End Transaction" enclosure. I have noticed that I can update one entry in the SQL database and no -journal file appears. However, if I update a second entry, the -journal file appears and will not go away.

Moreover, the more entries that are edited, the more lag the program experiences. Animations are slowed, motions take longer to register, etc. until finally, the program crashes when I try to open the database. This persists until I delete the associated -journal file, at which point all runs smoothly again.

I am trying to update the database and close the -journal file each time it is edited, but, beyond the aforementioned first update every cycle, the -journal file appears and begins its creeping drag on the program. I thought that the "Begin Transaction/Transaction Successful/End Transaction" envelope was supposed to close the -journal every time but perhaps I am mistaken.

Another user posted a similar issue on another thread and I admit that (against Erel's advice to the contrary), I did have some code included that deleted the -journal file every time the program was paused or closed, albeit to some pretty bizarre results. Obviously, this code has been removed since.

How can I get the SQL database to update fully to the point where it no longer needs a recovery -journal file when the table entries are edited, and removes the file? Normally I wouldn't care, but it lags the program and I end up having to delete it anyway in order to proceed.

Similar Threads