Thaniks, I hope it works as expected since I'm using SQLite in my e-mail client project (https://sourceforge.net/projects/envoy/) and I expect millions of people to use it eventually. I fear having to answer e-mails and complaints of hundreds of users whose e-mail databases have been corrupted.
So far the SQLite database has behaved very well and it's very fast. Olaf ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Tuesday, August 01, 2006 12:35 PM Subject: Re: [sqlite] Reading a damaged database file? =?utf-8?Q?Olaf_Beckman_Lapr=C3=A9?= <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to do this programmatically? I would like to recover from a > damaged database upon program startup. > If your program crashes, or your computer loses power in the middle of a database change, and thus leaves the database in an inconsistent state, recovery is automatic. You do not need to do anything. The database automatically reverts to its prior state. If, however, you set "PRAGMA synchronous=OFF" or if you delete a hot journal file, or if you write random garbage into the middle of a database file, then there isn't much you can do to recover. How exactly is your database being damaged and why do you think you need some kind of automatic recovery mechanism over and above what is already implemented? -- D. Richard Hipp <[EMAIL PROTECTED]>