One thing I'd do is not prepare a new statement handle and then
finish it during your loop.  To do this, you'll need to use
placeholders like:

my $q_delete_old_data = qq{DELETE DATA_TM
                            WHERE EXP_ID = ?};

my $sth_delete_old_data = $dbh->prepare_cached($q_delete_old_data);

foreach my $exp_id (values %experiments) {
   eval {
      $sth_delete_old_data->execute($exp_id);
   };
}

$sth_delete_old_data->finish();

This might clear it up a bit.  It will certainly make it more
efficient.

--Justin
http://www.practicalperl.com

On Wed, 7 Jan 2004 [EMAIL PROTECTED] wrote:

> Hi Jeremy,
>
> Thanks for your reply.
>
> The following block was identified by the error message:
>
> foreach my $exp_id (values %experiments) {
>    eval {
>       my $q_delete_old_data = qq{DELETE DATA_TM
>                                   WHERE EXP_ID = $exp_id};
>       my $sth_delete_old_data = $dbh->prepare_cached($q_delete_old_data);
>       $sth_delete_old_data->execute();
>       $sth_delete_old_data->finish();
>       undef $sth_delete_old_data;
>    };
> }
>
> Thanks again for taking the time to examine my problem.
>
> Bob
>
> _______________________________________________
> Boston-pm mailing list
> [EMAIL PROTECTED]
> http://mail.pm.org/mailman/listinfo/boston-pm
>
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to