I tried this from within VFP (assuming a database named prodata and tables named syccomp, arcust99 in that database) and it worked.
Here is what I did:
oConn = CREATEOBJECT("ADODB.Connection")
oConn.ConnectionString = "provider=vfpoledb.1;;
data source=.\prodata.dbc"
oConn.Open
? oconn.Execute("Select * from syccomp")
lo =oconn.Execute("Select * from syccomp")
? lo.Fields[1].value
ln = 1
lo =oconn.Execute("Select * from arcust99", @ln)
? ln
? lo.Fields[1].value
? lo.Fields[0].value
You can use "DIM" to create the object in VB and use the Execute to get to the VFP data.
No comments:
Post a Comment