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: "Delegal, Darin" <ddelegal at citistreetonline dot com>
Subject: RE: @@error
Date: Jun 17 2004 5:02PM

Robert Huber writes:
>How is the value of @@error obtained?


If using DBLib:

$dbh->dbretstatus

If using CTLib, you need a standard results handling loop. You should get back a return type of CS_STATUS_RESULT.

while($dbh->ct_results($restype) == CS_SUCCEED) {
	next unless $dbh->ct_fetchable($restype);

	if ($restype == CS_STATUS_RESULT) {
		@data = $dbh->ct_fetch;
		$status = $data[0];
	}

	.. handle other fetchable $restype here ...
}

Darin Delegal