sqlite運行錯誤示例

一. sqlite3 close returns error code 5

The sqlite3_close documenation states it clearly:

Applications must finalize all prepared statements and close all BLOB handles associated with the sqlite3 object prior to attempting to close the object. If sqlite3_close() is called on a database connection that still has outstanding prepared statements or BLOB handles, then it returns SQLITE_BUSY.

char sql[] = "select PileData.FileID as FileID, PileData.SourceData as SourceData, PileFile.SaveTime as SaveTime from PileData inner join PileFile on PileData.FileID=PileFile.FileID where PileFile.Upload=0 limit 1";
CRsQuery result = db.execQuery(sql);
if(result.eof())//沒找到未發送的文件
{
result.finalize();//增加該語句
db.close();
return FALSE;
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章