On Apr 8, 2005, at 2:35 AM, Paolo Vernazza wrote:

Charles Mills wrote:

I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this.

In psuedo code the logic is as follows:

select_stmt = db.execute("SELECT * FROM people")
# use some, but not all of the rows in select_stmt
create_stmt = db.execute("CREATE TABLE other (a,b)") # error: database table is locked


Why does this happen?

Anyway around this?

You must finalize select_stmt before running again db.execute

Right. I have an instance where I would like to keep the select_stmt _open_ (or not finalized) while I create a new table. Is this possible?


-Charlie



Reply via email to