Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting SQL Server stored proc return value
Message
 
 
To
08/12/2003 11:34:25
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00856398
Message ID:
00856848
Views:
22
Hi Gary,

I don't know about Sybase but it certainly works with SQL Server 2000.

>Hi Sergey,
>Thanks for the tip. It *almost* works. The proc executes ok but the return value is odd. Below is what I ran and the results.
>
>A possible problem is that I'm running this against Sybase 12.5 instead of MS SQL Server and I've found Sybase to be a little flaky sometimes. I'll run this against MS SQL Server as soon as I can. Thanks again.
>
>Gary
>
>*-- VFP Code
>LOCAL nRetVal
>LOCAL cName
>
>nRetVal = 0
>? SQLEXEC(nConnection,[{?@nRetVal=call test1 ?cName}]) && Returns 1
>? nRetVal && Returns 3.92438E-308
>
>*-- Stripped down version of the proc and call
>? SQLEXEC(nConnection,[{?@nRetVal=call test2}]) && Returns 1
>? nRetVal && Returns 4.06272E-308
>
>***********************************
> CREATE PROCEDURE test1
> @cName CHAR (8)
> AS
> BEGIN
> if @cName = 'Gary'
> return 123
> else
> return 321
> END
>
>**********************************
>
> CREATE PROCEDURE test2
> AS
> return 123
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform