Simon,
> Your text makes it look like you think that that kind of corruption affects > only existing rows. This is not the case. If you continue to write to a > database which shows this problem, you can lose more of the existing rows > and/or the new data you're trying to write. The proper reaction to any such > errors is to revert to an uncorrupted backup or, at minimum, to do VACUUM or > REINDEX then check that the data is still consistent and plausible. I am aware that other issues may exist. If the integrity_check did not return "ok" we would then try and fix the issues using the command line tooling. Generally if/when there is an issue it is reasonably minor, and a VACUUM or REINDEX fixes it. My concern was that the newer C# driver is showing different behaviour to the old driver when tested against the exact same sqlite file (I have unit tests covering this scenario). I have to justify changing our source code because of it. Keith, > Have you run "PRAGMA integrity_check;" from the command line shell against > the same database and does it return rows or just throw the same exception? Thanks for the suggestion, I have just run a test database that is "corrupted" using the latest sqlite3 download SQLite version 3.21.0 2017-10-24 18:55:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open entities-corrupt.db3 sqlite> pragma integrity_check; Error: database disk image is malformed sqlite> pragma quick_check; ok sqlite> REINDEX; sqlite> pragma quick_check; ok sqlite> pragma integrity_check; ok sqlite> So it looks like the actual engine is doing this now. This helps me justify altering our code base, to work with the revised behaviour. Kind Regards, Fugro Intersite. Barry Roberts. b.robe...@fugro.com<mailto:b.robe...@fugro.com> | www.fugro.com _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users