Allwolfpackfan
Programmer
I Need To Pull Data from a Table in Access into a FoxPro table or cursor. I've researched online and cannot find any info for this. Has anyone been able to accomplish this?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
h=SQLConnect("DSNNAME")
SQLExec(h,"SELECT * FROM theTable","crsVFPResult")
SQLDisconnect(h)
h=SQLConnect("YourAccessDSN")
SQLExec(h,"SELECT * FROM Data","crsVFPResult")
SQLDisconnect(h)
COPY TO c:\targetpath\accessdata.dbf
myself said:Then you may want to use SQLStringConnect instead of SQLConnect and use a connection string which is shown in variations for the several Access versions, drivers or providers at www.connectionstrings.com
Dim loRstVFP As New ADODB.Recordset
loCntVFP.ConnectionString = "Provider = vfpoledb.1;UID=;" & _
"Data Source=P:\Objitech\APPS\DEVELOP\Data\Develop.Dbc;" & _
"Collating Sequence=MACHINE;" & _
"Exclusive=no"
loCntVFP.CursorLocation = adUseClient
loCntVFP.Open loCntVFP.ConnectionString
lcSelectVFP = "SELECT commPendr.* FROM commPendr "
' Opening VFP cursor (commPendr table)
loRstVFP.Open lcSelectVFP, loCntVFP, adOpenKeyset, adLockOptimistic