Luca Olivetti wrote: > > Well, I posted all the error messages I got back from sqlite, as well as > the snippet of code I use to execute all my queries, but I can post more > details if it can be useful (I'd only need to know which details could be). >
Ah, I'm sorry, I missed your first post. The original corruption may well have been caused by omitting the thread safe option on the version of SQLite you were using. I don't believe that there is any reason to expect a vacuum to correct a corrupt database. In general database corruption must be avoided, since once it happens, it can't be corrected. The purpose of the vacuum operation is to reduce the size of the database file by releasing any unused pages that may be contained in the database file. If you are not concerned about disk space, there is no need to vacuum ever. If you have valuable data in the database file you may be better off adding an automatic backup process that saves backup copies of the database file periodically. Then you can restore a backup and continue from their if you detect a corrupt database. You might also want to add a process that does nothing but run integrity checks on the database in order to try to determine when the corruption occurred in case it happens again. This process would log the success or failure of each check. This may greatly reduce the number of operations you have to consider prior to a failure if the corruption happens again. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users