Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a string to SQL server/ Returning a string from
Message
De
06/09/1999 09:02:35
 
 
À
03/09/1999 16:50:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00261187
Message ID:
00261731
Vues:
23
>PMFJI
>How do you capture it in a sql-passthrough call? I've tried doing =SqlExec(nHandle, "exec sp_getstring ?inputparm, ?outputparm") but I always get an empty value on outputparm.

In order to call a stored procedure that returns values through output parameters with VFP's SPT, you have to use the ODBC calling syntax. It would look like this:

LOCAL outputparm
outputparm = 0
SQLExec(hConn, [{CALL storedprocedure (1, ?@outputparm)}])

This information is discussed in the VFP help. Chapter 21: Implementing a Client/Server Application. The section is called Using SQL Server Input/Output Parameters.

I haven't figured out any way to capture the return value from a stored procedure. If I need it, I return it through an output parameter.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform