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

Reply via email to