首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

SQLite数据库有关问题

2012-03-04 
SQLite数据库问题VC用SQLite删除Publish表中所有内容,代码如下:C/C++ codechar *pErrMsg NULLconst cha

SQLite数据库问题
VC用SQLite删除Publish表中所有内容,代码如下:

C/C++ code
char *pErrMsg = NULL;const char *pzTail = NULL;sqlite3 *pSqlite3;sqlite3_stmt *Stmt;sqlite3_open16(theApp.m_DatabaseFilePath, &pSqlite3);int ret = sqlite3_exec(pSqlite3, "begin immediate", NULL, NULL, &pErrMsg);int ret1 = sqlite3_exec(pSqlite3, "delete from Publish", NULL, NULL, &pErrMsg);int ret2 = sqlite3_exec(pSqlite3, "commit", NULL, NULL, &pErrMsg);

返回:ret=0;ret1=0;ret2=5, pErrMsg=database is locked! 
ret2总是返回5是怎么回事?请懂的大哥指教指教,谢谢先!

[解决办法]
JF

热点排行