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: Sybperl 2.0 on Sybase- IQ server
Date: Apr 27 1999 1:50PM

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" from
 > 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(...);
   $dbh->ct_execute(...);
   
}
# Here the connection has been closed, because $dbh has gone out of
# scope. 

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