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

sqlite3的sqlite_step执行update语句的时候总是返回5 数据库被锁解决方案

2012-03-12 
sqlite3的sqlite_step执行update语句的时候总是返回5数据库被锁求解应该怎么办插入,查询都没问题就是用upd

sqlite3的sqlite_step执行update语句的时候总是返回5 数据库被锁
求解 

应该怎么办 

插入,查询都没问题 就是用update就出问题
[code=C/C++][/code]sql=sqlite3_mprintf("update user set money=?,savedata=? where userID like ?") ;

sqlite3_prepare(db,sql,-1,&stmt,&tail);

sqlite3_bind_double(stmt,1,msg.msg_user.money);

sqlite3_bind_blob(stmt,2,buffer,sizeof(tm),NULL);

sqlite3_bind_text(stmt,3,msg.msg_user.userID,strlen(msg.msg_user.userID),NULL);

printf("[%d]",sqlite3_step(stmt));


printf打出的值是5 这是怎么回事 

求教了 谢谢

[解决办法]
前边的CUD操作commit了吗?确保commit了再update

热点排行