On Wed, 02 Jul 2014 17:03:43 +0100, Grzegorz Sikorski <g.sikor...@kelvatek.com> wrote:
> Hi Hick, > > You were right I was not finalizing statements and this prevented close > to complete. When I modified my code to finalize all statements before > close it works fine. > > However I was always checking return status from sqlite_close_v2 call > and it was always 0. This is fine according to the documentation: > > "If sqlite3_close_v2() is called on a database connection > <http://www.sqlite.org/c3ref/sqlite3.html> that still has outstanding > prepared statements <http://www.sqlite.org/c3ref/stmt.html>, BLOB > handles <http://www.sqlite.org/c3ref/blob.html>, and/or sqlite3_backup > <http://www.sqlite.org/c3ref/backup.html> objects then it returns > SQLITE_OK but the deallocation of resources is deferred until all > prepared statements <http://www.sqlite.org/c3ref/stmt.html>, BLOB > handles <http://www.sqlite.org/c3ref/blob.html>, and sqlite3_backup > <http://www.sqlite.org/c3ref/backup.html> objects are also destroyed." > > I admit I had missed this sentence, but to be honest, it seems to be > very confusing behaviour. Perhaps http://www.sqlite.org/c3ref/next_stmt.html is useful here. -- Groet, Cordialement, Pozdrawiam, Regards, Kees Nuyt _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users