Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Stored Procs
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00201705
Message ID:
00201779
Views:
20
My guess here is that you are looking for a way to capture the value of Output Parameters. Consider this stored proc:

CREATE PROCEDURE CustOrderHist @CustomerID nchar(5), @numberofrows integer OUTPUT
AS
Declare @retval bit
SELECT ProductName, Total=SUM(Quantity)
FROM Products P, [Order Details] OD, Orders O, Customers C
WHERE C.CustomerID = @CustomerID
AND C.CustomerID = O.CustomerID AND
O.OrderID = OD.OrderID AND
OD.ProductID = P.ProductID
GROUP BY ProductName
Set @numberofrows = @@RowCount
If @numberofrows > 0 Set @retval = 1

Return @retval


The following VFP code not only gets the return value, but the value of the Output Parameter as well:

mVar = 0
SQLExec(nhandle,"{CALL CustOrderHist ('ALFKI',?@mvar)}",'test') > 0
?mVar && the number of rows returned by the Output Parameter...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform