Sqlite sqlite3_config 报错 21
来源:互联网 发布:淘宝如何修改店铺名称 编辑:程序博客网 时间:2024/06/05 19:49
要使用Sqlite进行开发,需要用sqlite3_config()函数设置多线程模式,结果发现调用此函数一直ERROR,错误码是21.查看了相关的错误码文档,不明所以。。。之后果断google,找到了问题的所在和解决方案:
I struggled long and hard with this as well and finally got the solution.
sqlite3_config() needs to be called before sqlite3_initialize(). However, the OS might initialize sqlite for us so I also do a sqlite3_shutdown() before the sqlite3_config() i.e. 1) sqlite3_shutdown() 2) sqlite3_config() 3) sqlite3_initialize().
Then its also necessary to use the same connection for every query as it is the access to the database connection that gets serialized. As described herehttp://www.sqlite.org/capi3ref.html#sqliteconfigserialized
So I create a connection as soon as the app starts up and the pass that connection to every class that needs it.
地址:http://stackoverflow.com/questions/7795973/setting-sqlite-config-sqlite-config-serialized-returns-sqlite-misuse-on-ios-5
- Sqlite sqlite3_config 报错 21
- sqlite转义报错
- SqLite报错的解决办法
- Nhibernate下操作SQLite报错
- VC++中遍历SQLite时 报错
- sqlite报错 near "group": syntax error
- SQLite的 cannot commit - no transaction is active报错
- SQLite报错:getWritableDatabase called recursively的解决
- SQLite创建数据文件报错:Error: near "d"
- sqlite数据库报错:database disk image is malformed
- 频繁访问sqlite数据库报错 ,线程访问数据库
- [已解决]android SQLite报错 no such table
- SVN 报错 sqlite[S11]: database disk image is malformed
- (1) near "limit": syntax error (sqlite报错)
- SVN报错:sqlite[S5]:database is locked
- SVN 报错 sqlite[S11]: database disk image is malformed
- SQLite数据库报-1错误
- Sqlite数据库报错——The database disk image is malformed
- unix信号转载
- 译文:前端性能的重要性 The Importance of Frontend Performance
- MATLAB 信号分析FFT STFT
- Java关键字系列(class,package,import)
- mysql在一个表中存储创建时间和最近更新时间
- Sqlite sqlite3_config 报错 21
- 黑马程序员——Java基础——面向对象(2)继承
- 2014.09.04 周四-xml传变量-w3c:html
- 全局修改a链接的打开方式,javascript:void(0)会打开空白页面问题
- Oracle学习(二)--启动与关闭
- 图像分析:投影曲线的波峰查找
- 学习笔记
- synplify pro 201203分享下载
- ARM 指令集版本和ARM 版本