> > >I'm not sure about Access, but some underlying databases don't like
> > >multiple statements open at the same time on a single database handle.
> > >Just for testing, try opening separate database connections for each
> > >statement and see if that helps.
> > >
> > ># For example (untested):
> > >$sth_a = $dbh_a -> prepare( $sql_a );
> > >$sth_b = $dbh_b -> prepare( $sql_b );
> >
> > If that helps, I would cache the SQL strings, not the statement handles,
> > and use  just one $dbh.
> 
> It shouldn't matter, though, as, from looking at how he's using it, the
> implicit finish should be called, thus only one statement at a time would be
> running.

Indeed, using multiple $dbh's didn't make any difference.  Also, the DBI
documentation lends the impression that ->finish() shouldn't generally be
called explicitly.  I have found it necessary for statements where you
know just one row will be returned (i.e. count(*)) and aren't looping
through the entire $sth.  Otherwise, I thought I shouldn't be using it,
though?

Reply via email to