Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Lock
Message
De
04/03/2003 11:46:12
 
 
À
04/03/2003 10:38:24
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00760359
Message ID:
00760969
Vues:
22
>An OUTPUT parameter and a return value are two seperate things. Generally getting values back from an SP you use an Output parameter reserving the RETURN value for error handling. I have to admit, since in VFP you can't get access to the return value without using ADO, I never use it.
>
Hi Bob,

Generally I'm with you on using OUTPUT parameters for passing data back to VFP. But just FYI, you can get the SP return value with SQL Passthrough using code like the following:

#DEFINE CRLF chr(13)+chr(10)
=SQLEXEC(nConnectHandle, ;
'DECLARE @ret int' + CRLF + ;
'EXEC @ret = MySQLSvrStoredProc' + CRLF + ;
'select @ret as nResult','ResultAlias')

You can then retrieve the return value from the cursor returned. Vlad Grynchyshyn supplied me with this code methodology and I use it quite oftern to get the return value which usually holds any error parameter in my SP's.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform