On Fri, 2007-08-31 at 00:09 +0200, Yves Goergen wrote:
> On 30.08.2007 22:55 CE(S)T, Ken wrote:
> > BEGIN TRANSACTION;
> > CREATE TEMPORARY TABLE attached_db.temp_table (...);
> > INSERT INTO attached_db.temp_table SELECT * FROM attached_db.table1;
> > 
> > /* Add a comit */
> > COMMIT;  
> 
> Error: cannot commit transaction - SQL statements in progress

That error indicates that there are statements that have been
run (had sqlite3_step() called) but not finalized/reset (had
sqlite3_finalize() or sqlite3_reset() called). You need to 
finalize or reset all statements generated by the database
handle.

> CREATE TEMPORARY TABLE attached_db.temp_table ....

I'm not sure where that table is created - in the temporary
namespace or as part of attached_db. Checking...

  SQLite version 3.4.2
  Enter ".help" for instructions
  sqlite> attach 'def' as def;
  sqlite> create temporary table def.t1(a, b, c);
  SQL error: temporary table name must be unqualified

Huh. Maybe that's the root of your problem there.

Dan.


> 
> > DROP TABLE attached_db.table1;  -- Error: Table is locked
> 


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to