Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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 (Parson) 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
Node Status?
node history
Node Type: note [id://11123010]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2020-12-01 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (22 votes). Check out past polls.

    Notices?