|
|
sybperl-l Archive
Up Prev Next
From: Aravind Subramanian <aravind at genome dot wi dot mit dot edu>
Subject: Re: Stored procs/SQL syntax error catching in DBI/DBD::Sybase
Date: Sep 9 1998 11:21PM
DBD::Sybase 0.08 with Perl5.00404 on solaris 2.5
I do seem to get a second data set (the first being the expected -6 status data
set) which also has the -6 status but never returns 0 from
$sth->{syb_more_results}
aravind
Michael Peppler wrote:
>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?
> 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
>
>
|