T
Tomasz Nogalski
In an Access 97 application I used the following command to
import a FoxPro file named "bdeupd.dbf":
DoCmd.TransferDatabase acImport, "FoxPro 3.0", "c:\temp\",
acTable, "bdeupd.dbf", "tblImport"
"tblImport" is a table that already exists in the Access 97
database.
Now I had to update the application to Access XP which has
no direct support for FoxPro files anymore. When I use the
command above I get an error '2507' which tells me that
'the format "FoxPro 3.0" is not an installed database
format or does not support the selected action' (I cannot
print the exact error message here because it is a german
Access XP). I found out that I have to use ODBC instead. So
I created a system DSN named "BDE", using the "Microsoft
FoxPro VFP Driver (*.dbf)" (version 6.01.8630.01).
Then I tried to import the FoxPro database file using
TransferDatabase with ODBC, but without success:
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=BDE;
UID=;PWD=;SourceDB=c:\Temp;SourceType=DBF;"
produces a 'run-time error 3011'.
DoCmd.TransferDatabase acImport, "ODBC", "DSN=BDE;
SourceDB=c:\temp\", , , "tblImport"
produces a 'run-time error 3170: Could not find installable
ISAM'.
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=BDE;
SourceDB=c:\temp\", , , "tblImport"
produces a 'run-time error 3011: The Microsoft Jet database
module could not find the object "tblImport1"' (note the
'1' at the end of "tblImport1"; the table "tblImport"
(without a '1') already exists).
Can anyone help me with the correct ODBC string?
Tomasz
import a FoxPro file named "bdeupd.dbf":
DoCmd.TransferDatabase acImport, "FoxPro 3.0", "c:\temp\",
acTable, "bdeupd.dbf", "tblImport"
"tblImport" is a table that already exists in the Access 97
database.
Now I had to update the application to Access XP which has
no direct support for FoxPro files anymore. When I use the
command above I get an error '2507' which tells me that
'the format "FoxPro 3.0" is not an installed database
format or does not support the selected action' (I cannot
print the exact error message here because it is a german
Access XP). I found out that I have to use ODBC instead. So
I created a system DSN named "BDE", using the "Microsoft
FoxPro VFP Driver (*.dbf)" (version 6.01.8630.01).
Then I tried to import the FoxPro database file using
TransferDatabase with ODBC, but without success:
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=BDE;
UID=;PWD=;SourceDB=c:\Temp;SourceType=DBF;"
produces a 'run-time error 3011'.
DoCmd.TransferDatabase acImport, "ODBC", "DSN=BDE;
SourceDB=c:\temp\", , , "tblImport"
produces a 'run-time error 3170: Could not find installable
ISAM'.
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=BDE;
SourceDB=c:\temp\", , , "tblImport"
produces a 'run-time error 3011: The Microsoft Jet database
module could not find the object "tblImport1"' (note the
'1' at the end of "tblImport1"; the table "tblImport"
(without a '1') already exists).
Can anyone help me with the correct ODBC string?
Tomasz