This function does not have any real errors. The problem is how you call this function. If .execQuery() gives you an "out of sequence" error, that means you did not finalize() the previous query to the database. Do not forget, that CppSQLite3Query is a wrapper over serial interface, it is not an encapsulated object. You cannot have two active CppSQLite3Query objects simultaneously.

On 8/30/2011 10:56 AM, NOCaut wrote:

when i Offen use this code i see error "library routine out of sequence".I
understand that swears on a second appeal to the already open as BD.No then
make additional requests to fetch?

wchar_t * IconDB::SQLGetConfigValue(char *Key)
{       
CString s;
wchar_t * result;
char tmp[255];  
CppSQLite3Query q;
try
{
strcpy(tmp,"SELECT Value FROM Config WHERE Key = \"");
strcat(tmp, Key);
strcat(tmp, "\"");

CppSQLite3Query q = base.execQuery( tmp ); //<<<<<<<<<<<<<<<  Error

result = utf8_to_unicode(q.getStringField( 0 ));        
q.finalize();
}
catch(char *str){ MessageBoxA(0,str,"SQLGetConfigValue",0); }
return result;
}


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

Reply via email to