"Vivien Malerba" <[EMAIL PROTECTED]> wrote: > Hi! > > In a single process, I open two connections (C1 and C2) to the same > database (this is actually a corner case which could happen) and the > following sequence of operations fail: > 1- on C1 execute "CREATE table actor (...)" => Ok > 2- on C1 execute "SELECT * FROM actor" => Ok > 3- on C2 execute "SELECT * FROM actor" => error because table "actor" > does not exist. >
When C2 goes to parse the SQL in statement 3, it does not know that the database schema has changed because it has not attempted to access the database file. Thus it does not know that the new table exists. To fix this, you have to get C2 to access the database so that it will reread and reparse the schema and thus discover the new table. Perhaps something like this: 2.5- on C2 execute "SELECT 1 FROM sqlite_master LIMIT 1" -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------