|
|
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
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dbi
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-request@fugue.com. Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------
|