Hi, ALL,
I'm using following code to check for errors in debug mode:
int res = sqlite3_close( m_db );
if( res != SQLITE_OK )
{
// error handling
}
#ifdef DEBUG
sqlite3_stmt *statement = sqlite3_next_stmt( m_db, NULL );
if( statement )
const char *query = sqlite3_sql( statement );
#endif
However the call to sqlite3_close() make the 'm_db' pointer invalid if
everything is successful and hence the sqlite3_next_stmt() crashes.
How do I properly check if the DB is still open?
Or maybe I should put the code inside #ifdef....#endif before DB closing?
Thank you.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users