On Mon, 2002-02-25 at 10:22, Mark Wong wrote: > On Mon, 2002-02-25 at 10:05, Mark Wong wrote: > > On Thu, 2002-02-21 at 01:29, Zabach, Elke wrote: > > > > > (BTW: all output-parameter are initialized with NULL internally.) > > > > Maybe I don't quite understand what that means exactly. If those some > > of those output paremeters are not set, meaning that less than 100 items > > have been returned, I get the following error: > > > > SQLSTATE S1000 > > [SAP AG][LIBSQLOD SO][SAP DB]General error;-9806 Invalid output value. > > > > Thanks, > > Mark > > > > _______________________________________________ > > sapdb.general mailing list > > [EMAIL PROTECTED] > > http://listserv.sap.com/mailman/listinfo/sapdb.general > > I did not relay what is happening correctly, my bad. I will try again. > > The error message I reported early is correct. The hypothetical > situation is a bit different. If I'm expecting up to 100 items, and 99 > are returned, the if-statement still execute as true: > > IF $rc = 0 THEN > BEGIN > FETCH INTO :i_id100, :i_title100, :i_publisher100, :i_cost100, > :ol_qty100, > :ol_discount100, :ol_comments100; > SET items = items + 1; > END; > > I believe I have verified this by setting items = 0 originally, and > seeing items is set to 100 after the stored procedure is called, instead > of seeing items set to 99. > > I'll note that I said hypthetical earlier because I actually tested this > with a different stored procedure. I can give that data out if this > information doesn't reveal anything obvious. > > Thanks, > Mark > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general
I discovered something else about this. If the number of items returned is 0, then none of the if-statements execute. If the number of items returned (x) is less than 100, then x+1 if-statements executes. I'm trying to figure out what the valued returned from FETCH ($RC) is for the x+1 case, but if anyone can offer a hint for how to see what the value of $RC is exactly or what I should be checking against, that would be great. Thanks, Mark _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
