Duey, From 6.x days, I have cleared the Store Proc system variable (STP_RETURN and MICRORIM_RETURN) as the first line of the procedure. Perhaps it's _not_ required anymore, but no harm comes of it.
----- Original Message ----- From: "Heffelfinger, Duane" <[EMAIL PROTECTED]> To: "RBASE-L Mailing List" <[email protected]> Sent: Wednesday, May 21, 2008 12:27 PM Subject: [RBASE-L] - Re: STP_RETURN Variable when running a procedure Larry, Interesting. Lately I've been doing this with SET TRACE ON (Rbase 7.6) and getting a variable type error before the procedure even begins when the procedure RETURN type is different than the STP_RETURN variable type from a previously called procedure. I went ahead and converted my RETURN value to text in my integer procedures, then changed my call statements to something like: SET VAR vvar = (INT(CALL actconvert (.vactactual))) And all is well. Not sure how we differ in what we're doing. I really like procedures as well and have moved a lot of code to this method. Duey -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Lustig Sent: Wednesday, May 21, 2008 10:36 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: STP_RETURN Variable when running a procedure << As usual I'm probably missing something very simple here, but I've had some trouble running procedures one after another due to the STP_RETURN variable. >> Duey: I use stored procedures a lot and do not observe the problem you're reporting. I can run two stored procedures, one after the other, returning different types and I receive correctly typed return values each time. For instance, if I run an integer-returning stored procedure my variable is set to an integer, and I can see STP_RETURN is an integer value. If I immediately run a text-returning stored procedure my variable (a different one, of course) is set to text, and I can see that R:Base has recreated STP_RETURN as a text variable. This is in 7.6, but I've been using SPs almost since they were added to R:Base and have never seen this problem. -- Larry

