Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SP Call to VFP backend
Message
De
16/10/2001 13:51:11
 
 
À
16/10/2001 09:55:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00568870
Message ID:
00569150
Vues:
33
Craig,
I am using ADO now, as you suggested. However, I am still having trouble calling a Stored Procedure from my back-end vfp database. Here is the code I tried:

#INCLUDE adovfp.h
oCN=CREATEOBJECT('ADODB.Connection')
oCN.ConnectionString='Provider=VFPOLEDB.1;Data Source=c:\Mypath\MyDB.dbc'
oCN.Open()

oRS=CREATEOBJECT('ADODB.RecordSet')
oRS.ActiveConnection=oCN
oRS.Open('SELECT * FROM MyTable)

oCM=CREATEOBJECT('ADODB.Command')
oCM.ActiveConnection=oCN
oCM.CommandText='SP_TEST()'
oCM.CommandType=adCmdText

oRS=oCM.Execute()

? oRS.Fields[1].Value

The Connection opens no problem. The RecordSet performs the query on MyTable no problem. The Execute method of the command also appears to work (ie no errors) But, since my stored procedure, SP_TEST returns an integer, how do I get at the return value?

Thanks,
Alan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform