[yunqa.de] Re: Sqlite3 Error 11

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Fri, 26 Jun 2015 22:53:09 +0200

A simple database open does not necessarily detect errors. You must run

PRAGMA integrity_check;

and possibly

PRAGMA foreign_key_check;

for more certainty. The DISQLite3 documentation has the full details, the copy below is for convenience only.

Ralf

---

PRAGMA database.integrity_check;
PRAGMA database.integrity_check(N)

This pragma does an integrity check of the entire database. The integrity_check pragma looks for out-of-order records, missing pages, malformed records, missing index entries, and UNIQUE and NOT NULL constraint errors. If the integrity_check pragma finds problems, strings are returned (as multiple rows with a single column per row) which describe the problems. Pragma integrity_check will return at most N errors before the analysis quits, with N defaulting to 100. If pragma integrity_check finds no errors, a single row with the value 'ok' is returned.

PRAGMA integrity_check does not find FOREIGN KEY errors. Use the PRAGMA foreign_key_check command for to find errors in FOREIGN KEY constraints.

See also the PRAGMA quick_check command which does most of the checking of PRAGMA integrity_check but runs much faster.

On 26.06.2015 21:55, David Michael wrote:

The odd part is that it's just reporting the error. Close and restart
the software, and there's no error any more.
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: