Thanks Simon, I have already enabled extended error codes but I am not seeing any extended error codes being returned. I also enabled the error logging callback which just prints the errorcode and the error message which I was already getting when the sqlite3 api was failing. I know this error logging callback can report misuse of api's etc, but can this facility or any other logging facility tell me more about why an api is failing like for .e.g. in some customer scenarios I get sqlite_busy or database is locked and I am trying to add the error logging callback to see if I can get more details on why the database is locked or which process has locked it, etc. I have only one process which opens a connection to the database and sometimes when it restarts and then it detects the database is locked although there is no other process which accesses it.
-Mayank -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Wednesday, July 23, 2014 11:44 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Sometimes when my process restarts, it returns error "database is locked" On 23 Jul 2014, at 7:27pm, Mayank Kumar (mayankum) <mayan...@cisco.com> wrote: > SQLITE_LOG: sqlite errcode=26, sqlite errmsg=file is encrypted or is not a > database > > The same error code I get in the return value of sqlite3_step. Just wondering > if there is a way I can get this error logging call back to print more > details than this ? > I have enabled extended error codes, is there a way I can get some more error > details like :- -what part of the database is corrupted There is no way to tell. Sometimes this error is caused by a simple obvious part of the file (e.g. the text right at the beginning) but other times it means that two parts of the file disagree with each other. There's no way to tell which one got corrupted. Perhaps they both got corrupted. Perhaps the entire file is corrupt and has been replaced with a text file. > -what line number or when was this issue first detected SQLite does not know how your application is organised. One particular API call returns the error, so you know where the error was found: it was by that call. > -what is the extended error code in this scenarios ? If you have set the flag using <https://sqlite.org/c3ref/extended_result_codes.html> then you will get extended error codes. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users