使用FMDB Swift 3.0的SQLite(5:数据库被锁定)

时间:2017-05-03 11:33:51

标签: ios swift sqlite fmdb

我在项目中多次使用过FMDB。现在的问题是我的项目只在特定的屏幕上(在所有其他屏幕插入工作相当不错)当我尝试插入数据时它显示我的日志如下:

    Unknown error finalizing or resetting statement (5: database is locked)

    DB Query: begin exclusive transaction

    Unknown error calling sqlite3_step (5: database is locked) eu

    DB Query: INSERT INTO topic_detail (topic_id, topic_name, ques_name, ques_id, ques_img, date,is_customised,ques_audio,isPredefined,default_image_url,default_audio_url,is_synced) VALUES ('4', 'Animals (mammals)', 'gbj', '542', 'updatedQuestionImages/queImg542.png', '02/12/2017', 'true', 'updatedQuestionAudios/queAud542.m4a','false','no','no','false')

    Error calling sqlite3_step (1: cannot commit - no transaction is active) SQLITE_ERROR

    Unknown error finalizing or resetting statement (1: cannot commit - no transaction is active)

奇怪的是我可以更新记录但不能插入。我检查了所有关闭所有数据库连接的行。但不知道这个问题是怎么来的。请建议我解决方案。我搜索了谷歌和赌注流,但没有发现任何有用的信息。

0 个答案:

没有答案
相关问题