Looking at the implementation of sqlite3_expired, its just a comparison of the 
expired flag in the statement or if the passed statement is NULL. The cost is 
an additional if statement before execution, however this does not save you 
from SQLITE_SCHEMA errors. In theory someone could modify the schema just after 
you called sqlite3_expired, but before you step the statement.

The question should more likely be: When is the expired flag set?

Mike

> 
>> 
>> Use the function sqlite3_expired to determine, when you need 
>> to recompile a prepared statement. That's the approach I use.
>> 
>> Mike
>
>How does this compare with the re-preparing statements that 
>have failed with a SQLITE_SCHEMA error during sqlite3_step?
>
>e.g. http://www.sqlite.org/faq.html#q17
>
>Using sqlite3_expired certainly seems simpler to me. I'm
>guessing it would be less efficient. Would Dr. Hipp (or
>anyone else) care to comment on the relative merits of
>these two methods?
>
>Daniel.
>
>
>
>==============================================================================
>
>Please access the attached hyperlink for an important electronic 
>communications disclaimer: 
>
>http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>==============================================================================
>
>
>
>-----------------------------------------------------------------------------
>To unsubscribe, send email to [EMAIL PROTECTED]
>-----------------------------------------------------------------------------
>

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

Reply via email to