Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters using sql pass through function
Message
De
29/08/2002 17:28:26
Erik Lowery
Vartec Telecom, Inc.
Dallas, Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Passing parameters using sql pass through function
Divers
Thread ID:
00695209
Message ID:
00695209
Vues:
60
I am looking for the proper syntax in VFP a SQL-pass-through function (sqlexec)to pass a parameter called AuthCode to a SQL stored procedure called COPS_CHECK_USABLE_AUTHCODE. The stored procedure's output is @Result (1 or -1) and @Error_Message. I need to pass the Error_Message back to the form in VFP and display it in a text box called Error_Message. Below is the syntax that I am trying to use. Any assistance would be appreciated.




Local AuthCode as char, ;
Result as int, ;
Error_Message as char, ;
AcctPoolType as char;

Result = 0
Error_Message = ""
AcctPoolType = ""
AuthCode = thisform.authcode.value

SqlConnectionString = 'DRIVER=SQL Server;SERVER=VTCORP;DATABASE=CORP;uid=mktuser;pwd=tariff'
STORE SQLSTRINGCONNECT (SqlConnectionString) TO ConnectVtcorp
sqlsetprop(ConnectVtcorp, 'asynchronous', .T.)
?ConnectVtcorp

lnResult = sqlexec(connectvtcorp, '{exec COPS_CHECK_USABLE_AUTHCODE (?@Result output, ?@AuthCode, ?@AcctPoolType, ?@Error_Message output)}')

?lnResult

thisform.Error_Message.value = Error_Message

?sqldisconnect(lnResult)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform