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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only