Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlserver how to call a procedure that send back a value
Message
 
To
08/06/2012 08:54:46
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01545648
Message ID:
01545652
Views:
56
>i want to call a sqlserver procedure that make a calculation and send back the result to vpf. how to do it?

What result?
Is it a result set or just some value?

Both ways you could use a SELECT to generate VFP cursor:
? SQLEXEC(sqlHandler, "EXEC MySP","MyCursor")
BROWSE NORMAL


--- SQL Server SP MySP

SELECT * FROM SomeTable ...

--- Other version
DECLARE @SomeNumb number(10,2)
DECLARE @OtherNumb number(10,2)

SET @SomeNumb = 123
SET @OtherNumb = 12

SELECT @SomeNumb/@OtherNumb
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform