On Wed, 2005-04-13 at 17:59 -0500, Eric Bohlman wrote:
> [EMAIL PROTECTED] wrote:
> 
> > I am running into a situation that does not make sense.
> > I have allocated a flat file under the Operating System as follows (notice
> > that autocommit is off):
> >   $dbh = DBI->connect('dbi:SQLite:' . $dbms_file , "", "",
> >                           { RaiseError => 1,AutoCommit => 0 });
> > Then, I create multiple tables in a loop with with the sequence:
> > 1) CREATE TABLE ....
> > 2) $sql = SQL::Abstract->new;
> > 3) ($sql,@bind) = $sql->insert($table,\%rec);
> > 4) $sth{$table} = $dbh->prepare($sql);
> 
> Your problem is that each new CREATE invalidates all the statement 
> handles you previously prepared.
> 

Not only CREATE statements, but also DROP and VACUUM statements
will also invalidate all previously prepared statements.  Once a
prepared statement is invalidated, it must be prepared again.

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

Reply via email to