On 11 Jan 2017, at 3:28am, Kevin O'Gorman <kevinogorm...@gmail.com> wrote:
> I have a modest amount of data that I'm loading into an SQLite database for > the first time. For the moment it contains just two tables and a few > indices, nothing else. The first table loads okay, and if I stop the > process at that point, all is well and I can look at the database. > > If I go on to the second table, it appears to finish normally, but when I > try to look at the database with sqlite3, a command-line tool for > interacting with SQLite, it says the database is corrupt. Make absolutely sure you’re starting with a new database file each time, not continuing to write to an already-corrupt file. At stages during your Python program, including after you’ve finished loading the first table, use the following command to check to see whether the database is correct: PRAGMA integrity_check Use the same command in the command-line tool. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users