"Joseph J. Strout" <[EMAIL PROTECTED]> wrote: > > So clearly my database is corrupted. My two questions (three > questions!) are, how can this happen?
See section 6.0 at http://www.sqlite.org/lockingv3.html > Is there any way to prevent it? Don't do the things described in the document above that will result in a corrupt database. Sometimes you can't help it. If your disk control causes faulty information to be written to the disk platter, there is nothing the software can do about it. I have flaky memory on my desktop machine that sometimes will flip a random bit or two on hot days - nothing the software can do about that either. Generally speaking, corruption is not often a problems. > And is there any way to recover my data once I'm in this state? > Sometimes the ".dump" command on the command-line shell will recover some of the data. It is worth a try. Besides that, you will need to restore from a backup. There is little to no redundancy in an SQLite database file, so when things go bad, there is not much that can be done to recover. -- D. Richard Hipp <[EMAIL PROTECTED]>

