Dynamic creation of tables in sqlite locks the database?
I am using sqlite database for my application. When i create tables in it dynamically the app works fine for the first time but when I re start the app i can only read the earlier values that i inserted but no new values get inserted. there is nothing wrong with the c开发者_JAVA百科ode all finalize and all related statements are in place.
Any suggestion why it is happening, the sqlite is giving the error that the database is locked.
As many time mentioned:
"Open the database once at the start of your app, then close it in applicationWillTerminate of the AppDelegate. After every exec you will want to do a reset to clear the connection state."
- so did you close your database at app quit?
- try sqlite3_reset(stmt) befor finalize
精彩评论