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: Amy Chua <AmyChua at techsemi dot com dot sg>
Subject: Sybperl 2.0 on Sybase- IQ server
Date: Apr 27 1999 1:53AM

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??

Please advise. Thank you.

This is a sample of my code...

$Y = Sybase::CTlib->ct_connect($uid2, $pwd2, $srv2);
$Y->ct_execute("select a.WLCL, a.TEST_PT_C, a.PRODUCT_M
		from E_CTL_LMT a where
		a.TEST_PT_C = 'LP'");
		
while(($rc = $Y->ct_results($restype)) == CS_SUCCEED) {
	next if($restype == CS_CMD_DONE	|| $restype == CS_CMD_FAIL ||
		$restype == CS_CMD_SUCCEED);
	while(@data1 = $Y->ct_fetch()) {
		$WLCL{$data1[2]} = $data1[0];
		
	}
}


Thanks and Regards,

Amy Chua