Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: error dbi

by Anonymous Monk
on Oct 20, 2020 at 00:43 UTC ( #11123010=note: print w/replies, xml ) Need Help??

in reply to error dbi

I really do need clarification on several implementation-specific points that seem to have been brought up here: (1) Is it "best practice" to call FINISH() every time? (2) Will there be resource-leaks if you do not completely consume a recordset, i.e. which would not occur if you did? (3) If a cursor variable goes out-of-scope, is FINISH() automatically called on it (if necessary)?

Replies are listed 'Best First'.
Re^2: error dbi
by erix (Prior) on Oct 20, 2020 at 09:59 UTC

    perldoc DBI:

    "finish" $rc = $sth->finish; Indicate that no more data will be fetched from this statement han +dle before it is either executed again or destroyed. You almost certai +nly do *not* need to call this method. Adding calls to "finish" after loop that fetches all rows is a com +mon mistake, don't do it, it can mask genuine problems like uncaught f +etch errors.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11123010]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2021-05-07 10:07 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (90 votes). Check out past polls.