> -----Original Message-----
> From: Jay Sprenkle [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 23, 2006 11:27 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] "SQL logic error or missing database"
> 
> It was prepared after the schema was changed and written to disk.
> That seems pretty unintuitive to me. When you prepare the 
> statement it evidently doesn't use the current schema, though 
> it knows the schema has changed...
> I guess that implies the call to reset() reloads the schema 
> I'll check that=0

I changed the select statement to read "select * from foo" which was the new
table created on the 2nd connection.  When I did that, sqlite3_prepare()
returned immediately with SQLITE_SCHEMA.  So it appears that the schema is
only reloaded on prepare() under certain conditions. 

Immediately calling prepare() again after getting SQLITE_SCHEMA above
resulted in a properly prepared statement that step()'d normally.

Robert


Reply via email to