I have two sqlite connections and execute like below(CMyDatabase is a derived class of sqlite3):
CMyDatabase* dbConnection1 = new CMyDatabase;
dbConnection1->OpenDataBase(CQCommon::GetModulePath() + L"test.db");
CMyDatabase* dbConnection2 = new CMyDatabase;
dbConnection2->OpenDataBase(CQCommon::GetModulePath() + L"test.db");
dbConnection2->BeginTrans();
CString updateStr("update ImageAlbumEntry set ImageID = 2 where ID = 1;");
dbConnection2->ExecNoQuery(updateStr);
CString queryStr("select ImageID from ImageAlbumEntry where ID = 1;");
CppSQLite3Query queryResult;
dbConnection2->ExecQuery(queryStr, queryResult);
cout<<queryResult.getIntField(0)<<endl;
dbConnection2->EndTrans(TRUE);
dbConnection2->CloseDataBase();
dbConnection1->CloseDataBase();
Now when I invoke dbConnection1->CloseDataBase(). I met with the error stated as 'Unable to close due to unfinalised statements'. Can anyone explain the reason and resolve method of the problem? Thank you!