Jay Sprenkle wrote:

On 3/31/06, Matthew Gertner <[EMAIL PROTECTED]> wrote:
Hi,

I'm trying to detect changes in our application schema and update the
corresponding database schema automatically, but only when the table in
question is actually needed (i.e. a sort of on-demand schema update).
The problem I'm having is when other statements are open when this
occurs, in which case I seem to be getting a "SQL logic error or missing
database" error when I try to run CREATE TABLE.


Your statements must be prepared again after the schema changes.
It's a limitation of the sqlite package.
The SQLITE_SCHEMA case is handled in our code. But in this case, we are in the middle of iterating a statement. Can we prepare it again without "losing our place"? Is this the right action considering that we are getting a SQLITE_ERROR when executing the statement, not SQLITE_SCHEMA?

Matt

Reply via email to