Yes, q.finalize() should close the previous query. But that is not the point here. All query objects are build upon the same resource (database connection). This resource cannot be shared between two queries. They have to be created and killed sequentially.

CppSQLite3Query q1= db.execQuery("...");
while(q1.step()); // or q1.fetch()
q1.finalize();
somestring = db.SQLGetConfigValue("one"); // ok

CppSQLite3Query q2= db.execQuery("...");
while(q2.step()); // or q1.fetch()
otherstring = db.SQLGetConfigValue("two"); // out of sequence error
q2.finalize();


On 8/30/2011 12:41 PM, NOCaut wrote:

This line most finalizate
   q.finalize();<<<<<<

or not?

IO use in the COM object  when i open folder I do it somethink with Database

STDMETHODIMP CMyOverlayIcon2::IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib)
{
// use only select query
(!wcscmp(db.SQLGetConfigValue("Active") ...
}



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to