On 2014/07/03 14:05, Simon Slavin wrote:
On 3 Jul 2014, at 8:47am, Hick Gunter <h...@scigames.at> wrote:
This function is already available in the sqlite3 C interface.
I did not understand that at all. I have never needed to look at that
statement. But yes, it does allow you to find out if there are any open
statements for a database. Thanks.
However, I still believe that attempting to close a database when it has open
statements should not result in SQLITE_OK.
Simon.
I agree somewhat - but I cannot see it really happening. Maybe an easier
interface to call and see if there are open statements.
The reason I say this is simply because one sometimes close a DB during normal operation, but let's not forget the very largest
reason DB's close is because someone just clicked "Exit" or the little red cross or round thingy up there, whatever flavour of OS
you may use, and the last thing that anyone would want is a program when closing.. doesn't, or prevents windows from shutting down
cause it still has to do something, or such. Normally when one calls "sqlite3_close()" you expect that to be the end of things.
Unless of course you are using the closing as a sort of programmatic step, which I sometimes do too... but then one should add other
code to test the assumptions.
That is not to say it can't be done better or more thorrougly by sqlite itself (or the api anyway), but I doubt the value of
returning error codes when close is called other than when a possible corruption is imminent.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users