PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Closing a connection in CTLIB
Date: Feb 10 2000 5:22PM

tim.wilson@barclayscapital.com writes:
 > I notice there is a dbclose in DBI , but how do you close a connection with
 > CTlib before the program exits?
 > 
 > I have a script that may wait around for some hours but by that stage it has
 > finished with the DB connection. 
 > 
 > This can cause problems if there are alot of these scripts waiting with open
 > connections.

The connection is closed when the $dbh goes out of scope. 
Alternatively, 
	undef $dbh; 
should do the trick.

You can verify this by turning tracing on via Sybase::CTlib::debug().

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com