Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: Is there a way disconnect from database

by mikeB (Friar)
on Jun 28, 2001 at 23:04 UTC ( #92419=categorized answer: print w/replies, xml ) Need Help??

Q&A > database programming > Is there a way disconnect from database - Answer contributed by mikeB

DBI will automatically close open connections at the end of a program, but will complain to let you know you forgot. This happens even with Ctrl-C, as the closing is handled by the connection's DESTROY method, which is invoked by Perl's garbage collection when the program terminates.

A major problem with depending on the automatic close is the variance in handling of open transactions. Some DBD's will commit, while others rollback.

Check out chapter 4 of Programming the Perl DBI (the ORA Cheetah book).

  • Comment on Answer: Is there a way disconnect from database
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[MidLifeXis]: Nothing like encouraging the success of a rollout by neutering your current support structure without a reasonable staffed and trained replacement structure.
[MidLifeXis]: Speaking of which, anyone know of Perl positions in the MKE area (or slightly west)?
[Corion]: MidLifeXis: Oh, enjoying the show from the sidelines I see...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-03-23 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (286 votes). Check out past polls.