HI
I am providing the copy of the VFP7 help file syntax..
*******************************************************
Use the SQLEXEC( ) function with the stored procedure name.
For example, the following code displays the results of calling a stored procedure named sp_who on SQL Server using an active connection to the data source sqlremote:
nConnectionHandle = SQLCONNECT('sqlremote')
? SQLEXEC(nConnectionHandle, 'use pubs')
? SQLEXEC(nConnectionHandle, 'sp_who')
BROWSE
*******************************************************
Hope this helps you. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK
If you need VB code, you need to post in a VB forum. But the premise of executing a VFP stored procedure (Using ADO,DAO,etc) is the same as any other data source.
Set oConn = CreateObject("ADODB.Connection"
Set oRS = CreateObject("ADODB.Recordset"
Set oCmd = CreateObject("ADODB.Command"
oConn.ConnectionString="Provider=VFPOLEDB.1;Data Source=C:\path\testdata.dbc"
oConn.Open
Set oCmd.ActiveConnection = oConn
oCmd.CommandText = "MyStoredProcedureName"
oCmd.CommandType = 4 && SP
Set oRS = oCmd.Execute()
FWIW, I havent used the new VFP Provider, but maybe someone else could comment on their findings as to what all it supports. Jon Hawkins
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.