On Tue, 2007-06-19 at 15:39 -0400, Igor Tandetnik wrote:
> Shane Harrelson
> <[EMAIL PROTECTED]> wrote:
> > To use pragmas from code, do I simply prepare them as a regular SQL
> > statement and then execute them?
> 
> Yes.

Another thing to note: Some pragmas take effect during 
sqlite3_prepare(), not sqlite3_step() (examples: cache_size, 
temp_store). For this reason calling sqlite3_reset() and then
reusing a PRAGMA statement has the potential to produce 
confusing results (or at least SQLITE_SCHEMA errors).

Personally, I would use sqlite3_exec() to execute pragma statements
from C code.

Dan.

> > And when can they/should they be done?   As the first statement after
> > an open?
> 
> Some pragmas have to be set early, others may be changed at any time.
> 
> > Are the pragma values stored with the database?
> 
> Some pragmas affect the format of the database file - these are stored 
> in the database. Others only affect current connection - these are not 
> stored.
> 
> 
> Is there are particular pragma you are worrying about?
> 
> Igor Tandetnik 
> 
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 


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

Reply via email to