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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only