|
|
sybperl-l Archive
Up Prev Next
From: kvk at hmco dot com
Subject: Re: results pending problem
Date: Aug 2 1999 6:19PM
Yer calling dbresults in a loop. You've gotta call nextrow in a loop within
that.
while( $dbproc->dbresults != NO_MORE_RESULTS) {
while (@data = $dbproc->dbnextrow;) {}
}
>
> Hey David,
>
> Thanks for the response. I am calling dbnextrow in a while loop as
> follows :
>
> while( $dbproc->dbresults != NO_MORE_RESULTS) {
> $dbproc->dbnextrow;
> }
>
> How else do you recommend that I call dbnextrow ??
>
> Thanks,
> Brian
>
> --- "WORENKLEIN, David, GCM" wrote:
> > Call dbnextrow in a loop.
> >
> > -----Original Message-----
> > From: Brian H [mailto:bridudebri@yahoo.com]
> > Sent: Monday, August 02, 1999 12:29 PM
> > To: SybPerl Discussion List
> > Subject: results pending problem
> >
> >
> >
> >
> > The following sybperl code is giving me a error
> > message
> > DB-Library error:
> > Attempt to initiate a new SQL Server operation
> > with results
> > pending.
> >
> >
> > $dbproc->dbcmd("MyStordProc $arg1_int,
> > "$arg2_text\"");
> > $dbproc->dbsqlexec;
> > while( $dbproc->dbresults != NO_MORE_RESULTS) {
> > $dbproc->dbnextrow;
> > }
> > $sp_status = $dbproc->dbretstatus;
> > if ( $sp_status == 0 ) { # execute
> > sql
> > # SQL OK
> > } else {
> > # SQL Failed
> > }
> >
> > } # IF THEN ELSE
> >
> > I am running perl 5.004_05 for sun4_solaris and
> > sybperl 2.10.
> >
> > Any thought or ideas to solve this problem would be
> > great !!!
> > Thanks,
> > Brian
> > _____________________________________________________________
> > Do You Yahoo!?
> > Free instant messaging and more at
> > http://messenger.yahoo.com
> >
> >
>
>
> _____________________________________________________________
> Do You Yahoo!?
> Free instant messaging and more at http://messenger.yahoo.com
>
>
|