On 8 Jun 2011, at 12:35pm, dcharno wrote: > I have a database that returns SQLITE_CORRUPT during certain queries, > but other than that it opens, closes and generally works fine. > > - Is there a way to check the database when its open, other than running > through a bunch of test queries?
<http://www.sqlite.org/pragma.html#pragma_integrity_check> > - Is there any general way to fix corruption issues? (probably not but > I thought I'd ask) Depends on the nature of the corruption. A good standard way to do it is to use the command-line tool to dump the database as SQL commands, then make another database and use those commands to put the same data back in. But of course your own particular corruption may mean you've lost some records. And if you have FOREIGN KEYs you may have to rearrange the lines in the SQL text file so new tables are entered in the right order. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users