Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP Call to VFP backend
Message
From
16/10/2001 13:51:11
 
 
To
16/10/2001 09:55:53
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00568870
Message ID:
00569150
Views:
32
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform