I have a VB program where I read from a FoxPro table and insert the data into a SQL Server db.
First, you need to create a foxpro data source on the machine running the app. That's what the <DataSourceName> is in the strConString variable. I made my datasource look in the root directory, that allows me to open any FoxPro table on that machine.
' Set a connection string
strConString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=<DataSourceName>"
' Create a recordset from the FoxPro data
Private Function OpenDBFile(strDBName As String) As ADODB.Recordset
Dim rs As New ADODB.Recordset
stbStatusBar.Panels(1).Text = "Opening " & strDBName
' cn is global in the module
If cn.State <> adStateOpen Then cn.Open strConString
rs.CursorLocation = adUseClient
rs.Open strDBName, cn, adOpenForwardOnly, adLockReadOnly, adCmdTable
Set rs.ActiveConnection = Nothing
cn.Close
Set OpenDBFile = rs
stbStatusBar.Panels(1).Text = ""
End Function
Call the above function with the path and name of the FoxPro table and it returns a recordset.
You can create another connection object to your Access data similar to above method to update you data.
Hope this helps,
Clay Haller