Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Stored Procs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00201705
Message ID:
00201779
Vues:
19
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform