Jordan Hayes wrote: > > Where would the file be? It would be "beside" the database file, i.e. in the same directory as the database file. The journal only exists while sqlite is modifying the database. When a change has been completed successfully, the journal file is deleted.
> I don't see a file. I didn't write the > application, but it runs in Windows. Under Windows does it get put > somewhere "special" ...? > When I restarted the application it didn't > give me any notice that anything was wrong; Normally it wouldn't give you any indication it found a journal. When the application opened the database file, the sqlite library would see the journal file (if it existed) and use it to restore the database file to the exact state it was in before the last change (i.e. transaction) started, and then delete the journal file. If there is no journal file, the library assumes the database file is intact and simply opens it for use. If the application was making changes and hence a journal file existed at the time of the power failure, the database file would be in an inconsistent state. The journal file has the information needed to restore the state. If you, or your application, deleted this journal file (thinking it was a temporary file left over from the crash) before the sqlite library gets a chance to see it (i.e. before the database is opened again) your database file is left in the inconsistent state. Some applications perform an integrity check on database files immediately after they are opened. These applications may report the problem if a "hot" journal file is deleted, since the database may have been left in an inconsistent state by a partially complete change. An application could check for the existence of the journal file before opening the database, and report that the incomplete transaction will be rolled back as the database is opened. I doubt if many applications do this however. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users