Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: error dbi

by Anonymous Monk
on Oct 20, 2020 at 00:43 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-23 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found