Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I return results from a SQL Server stored procedu
Message
De
30/12/1999 14:06:41
Oleg Khvalin
The Sutherland Group Ltd
Rochester, New York, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00310595
Message ID:
00310605
Vues:
24
>I need to know how to initially call a stored procedure in SQL and then how to return the results back to the VFP calling program as a cursor, array or variable (depending on the results of the s.p.). As an example, I've created a stored procedure named "spCountryList" in SQL Server's NorthWind database using the following syntax:
>
>CREATE PROCEDURE "spCountryList" @cCountry char(20) AS
>select * from customers where country = @cCountry
>
>This should return the records from the customers table when a country is specified (i.e. "UK" will be captured in VFP as cCountry and then passed to the stored procedure as @cCountry. All the records which have "UK" in the country field will then be returned).
>
>Thanks in advance,
>
>Patrick


lcCountry="UK"
= SQLEXEC (gnConnHandle, "sp_CountryList ?lcCountry", "curCountry")

HTH
Oleg
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform