Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: RE: Sybperl 2.0 on Sybase- IQ server
Date: Apr 27 1999 2:36PM
WORENKLEIN, David, GCM writes:
> My understanding is that Sybperl will disconnect some time after the handle
> goes out of scope, but it's up to the Perl garbage collector to decide
> exactly when it happens. Even if a it usually happens when the handle goes
> out of scope, you can't depend on it in future versions of Perl.
Could you point me to some docs or messages that discuss this?
If this is correct then we should add explicit closing of connections
($dbh->ct_close() I guess) to the Sybase::CTlib module.
> -----Original Message-----
> From: Michael Peppler [mailto:firstname.lastname@example.org]
> Sent: Tuesday, April 27, 1999 9:50 AM
> To: SybPerl Discussion List
> Subject: Sybperl 2.0 on Sybase- IQ server
> Amy Chua writes:
> > I am new to sybperl and currently learning to use sybperl to access an IQ
> > server, to retrieve data and generate a report. I ran into some problems
> > whereby sometimes my program "hang" the IQ server. I suspect the problem
> > with ct_connect, but I am not sure whether I need to do a "disconnect"
> > the IQ server. As much as I know, there doesn't seem to be a "disconnect"
> > command in CTlib module. Does Sybperl automatically disconnect from the
> > server once CS_CMD_DONE??
> Sybperl disconnects automatically when the database handle ($Y in your
> example script) goes out of scope, or becomes undefined.
> So for example:
> my $dbh = Sybase::CTlib->ct_connect(...);
> # Here the connection has been closed, because $dbh has gone out of
> # scope.
> Michael Peppler -||- Data Migrations Inc.
> email@example.com -||- http://www.mbay.net/~mpeppler
> Int. Sybase User Group -||- http://www.isug.com
> Sybase on Linux mailing list: firstname.lastname@example.org
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: firstname.lastname@example.org