SQLITE_BUSY错误 [英] SQLITE_BUSY error
问题描述
在完成申请之前,我遇到了最后一个问题.我使用SQLITE数据库.一切都可以在模拟器上完美运行,但是当我在具有Dev Provisioning配置文件的Iphone上运行该应用程序时,我在sql方法上遇到了错误:
I have a last probleme before finishing my application. I use SQLITE DataBase. Everything works perfectly on the simulator, but when i run the app on my Iphone with Dev provisionning profile, i got an error on the sql methods :
我有一个执行以下代码的方法:
I have a method that executes the following code :
if(sqlite3_prepare_v2(数据库,sqlStatement,-1,& compiledStatement,NULL)== SQLITE_OK)
if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK)
很遗憾,此行发送SLITE_BUSY.
Unfortunately, this line send SLITE_BUSY.
但是奇怪的是,如果我用相同的SQLITE部分执行另一个方法,它就可以工作.仅此特定方法会崩溃.
But the weird thing is that if I execute another method with the same SQLITE part, it works. only this specific method crashes.
我不认为这是数据库锁的问题,但是我很疯狂地试图找出原因!
I don't think it is the lock on the database that is the problem, but i'm going crazy trying to figure it out !
请帮忙!
推荐答案
这不是SQLite问题,当我说数据库不可能被锁定时,我是对的.
It wasn't a SQLite problem, i was right when i said that it wasn'it possible that the DB was locked.
我只是重启了iMac和iPhone,现在一切都很好.
I juste restarted my iMac and the iPhone and all is allright now.
谢谢大家!
这篇关于SQLITE_BUSY错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!