Igor Mironchick <[EMAIL PROTECTED]>
wrote:
What about this:

char * errors;
// I guarante that here no errors in SQL syntaxis.
char * sql = "SELECT * FROM data";

sqlite3_exec( db, "BEGIN", 0, 0, 0 );

int ret = sqlite3_exec( db, sql, 0, 0, &errors );

What's the point of running a SELECT statement without actually reading the returned rows?

while( ret != SQLITE_OK )
{
   std::cerr << "There is some errors while executing SQL statement: "
<< errors << std::endl;
   sqlite3_free( errors );
   ret = sqlite3_exec( db, sql, 0, 0, &errors );

Why do you want to keep running the same statement over and over?

}

sqlite3_exec( db, "END", 0, 0, 0 );

More dangerous when "COMMIT" after "INSERT" return SQLITE_BUSY!!!

I'm not sure I understand what your point is here. You have a reader that hogs the database forever in a long-running transaction. Of course writers are locked out.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to