Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at mbay dot net>
Subject: Stored procs/SQL syntax error catching in DBI/DBD::Sybase
Date: Sep 9 1998 10:59PM

    *** From dbi-users -- To unsubscribe, see the end of this message. ***

Aravind Subramanian writes:
 >     *** From dbi-users -- To unsubscribe, see the end of this message. ***
 > We are having problems with processing result sets returned from
 > DBI/DBD::Sybase.
 > The code snippet below is used to process result sets. It enters into an
 > infinite loop (in the inner do-while block) when the sql that these
 > results were obtained from had a
 > syntax error.
 > For example, if the sql statement sent a stored procedure a varchar
 > where it should have used a NUMERIC(8,3), the code does *not* exit the
 > fetchrow_hashref controlled block.
 > The output is:
 > ********Result set 1
 > key = COL(1): value = -6

This first result set is the return status from the stored proc. In
this case, because the stored proc is not even executed (data
conversion failed) it returns -6 by default (this is a standard error
return code in Sybase).

Now normally $sth->{syb_more_results} should return 0 after this.

Which version of DBD::Sybase are you running?

Michael Peppler         -||-  Data Migrations Inc.       -||-
Int. Sybase User Group  -||-

To unsubscribe from this list, please visit
If you are without web access, or if you are having trouble with the web page,
please send mail to   Please try to use the web
page first - it will take a long time for your request to be processed by hand.