At 2:49 AM +0200 6/3/04, David Costa wrote:
On Jun 3, 2004, at 2:17 AM, Darren Duncan wrote:
At 2:04 AM +0200 6/3/04, David Costa wrote:so in this case you just check if a file .journal exist and if it does you keep that file right ?
Yes. But check the sqlite.org website documentation to make sure that is the correct file name.
from here http://www.sqlite.org/fileformat.html it looks like is a file with -journal appended.
Now (hope will be my last question and sorry again for bothering) am I right to assume that if a -journal file exist something has gone wrong and that file should be part of the backup
for the relevant rollback ?
Yes. If the -journal file exists, then backup that file also and keep it with the actual database file; the two files should stay in the same folder and have the same names, as they originally do.
Secondly, for testing purposes, how can I create the situation where something doesn't go as planned and the -journal file appears ?
In a program of yours that uses SQLite, make some change to a database, such as an INSERT, and then make your program exit without issuing a commit or a close. Then a journal file should be left behind.
thanks David Costa
-- Darren Duncan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]