in reply to DBI ERROR

Can you post a bit of code? Can you add some debug statements (with $| = 1) or run it in the debugger to determine exactly where the error (warning more likely) occurs?

Good Luck!

Replies are listed 'Best First'.
Re: Re: DBI ERROR
by Anonymous Monk on Apr 13, 2001 at 03:30 UTC
    my ($self, @cursors) = @_; my $cursor; foreach $cursor (@cursors) { if (exists($self->{CURSORS}{$cursor})) { # eval { my $ref = $self->{CURSORS}{$cursor}; delete($self->{CURSORS}{$cursor}); $ref->finish; } } } } if ($self->{CONNECTION} && !$self->{CONNECTION}->{InactiveDestro +y}) { $self->{CONNECTION}->disconnect;
    I am checking if there is any open cursor. Hope it helps. DBI Version is 1.06 and perl version is 5.0.3
      Tim Bunce sent me an e-mail earlier this week where he pointed out that it's very rare that you need to call finish() explicitly. If you're querying a large result set and only fetch a couple of rows, you could call it to free up memory.

      I don't have the DBI book with me, or I'd quote chapter and verse, but I know there's something about it in the DBI manpage. You can probably get by without it here, unless you're doing something exotic. (You might also like prepare_cached()).