While closing sqlite3 using sqlite3_close function it returns error code 5 5 - database file is busy. How to fix this issue.
A:
Answer is in the question, see if you are accessing the db externally.
Vishal
2010-01-27 05:28:07
No i'm not accessing it externally. But I have opened in DB in two different function f1() and f2(). for insertion and when sqlite3_step() is done while doing sqlite3_close() it always returns busy from both f1() and f2()
lakshmipathi
2010-01-27 05:32:38
Check out this post:http://stackoverflow.com/questions/964207/sqlite-exception-sqlite-busy
Vishal
2010-01-27 06:07:13
+2
A:
The sqlite3_close
documenation states it clearly:
Applications must finalize all prepared statements and close all BLOB handles associated with the sqlite3 object prior to attempting to close the object. If sqlite3_close() is called on a database connection that still has outstanding prepared statements or BLOB handles, then it returns SQLITE_BUSY.
laalto
2010-01-27 10:46:32