Thx Gunter...
that's the problem. I've capsuled the sqlite access in some database classes. So i have only the call a function named getProperty with some parameters. But in some cases it may be possible that the instance of the object calls this function from another thread (with the same stmt). The main thread reads...  meanwhile the other thread access resets the stmt results...

Thx again!

Am 11.09.2018 um 13:58 schrieb heribert:
I've a prepared select statement (the database is in :memory: based.).
After binding the input values, calling next, checking the result type of a text column, sometimes the follwing sqlite3_column_text returns with a nullptr.

The stange thing is: the prior called sqlite3_column_type do not return with SQLITE_NULL.

if  (sqlite3_column_type(_sqlite3_stmt, Field) == SQLITE_NULL)
    return false;

 LPCSTR cp = (LPCSTR)sqlite3_column_text(_sqlite3_stmt, Field);
if (cp == nullptr)
{
    ASSERT(false);
    return false;
}

Is that correct? May it be possible that sqlite3_column_type returns NOT SQLITE_NULL and the following sqlite3_column_text returns with nullptr?

Thx for any hint
heribert
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

Reply via email to