Ran <[EMAIL PROTECTED]> wrote:
> Indeed if I reset after the first step failed, and than prepare again, the
> select works. But I guess this is not the usual way to do things right? I
> mean - shouldn't the first prepare be aware of the fact that the database
> was changed? Or maybe CREATE TABLE is a special case?
> 

Because the schema change happened on a separate
database connection, the other connection does not
realize that the schema has changed until it accesses
the disk again.  And no disk access occurs until you
run sqlite3_step().  Thus, even though the schema
change occurred temporally before the sqlite3_prepare(),
the sqlite3_prepare() had no way of knowing about the
schema change and used the old schema.

--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to