I have a small MSAccess database that I have coded to do a Transfer Database and Imports dBase IV information so I can query, sort and report on the information.

The problem is that the user must first export the original information out of a Btrieve database application. The Btrieve front end program supplies a Btrieve ODBC driver and I can attach the Btrieve Files using Table, New, Link Table, ODBC and Select Data Source, but they are linked using the Btrieve Table Name and all of my queries and reports use my standard table names. I don’t want the end user to attach the tables and then change the table names. Also I want to attach to the table as a READ ONLY as I don’t want the user to be able to change anything in the Linked Btrieve table.

I now use:
DoCmd.TransferDatabase acImport, "dBase IV", MyImportDir, acReport, MyImportFile, "gbAccessTableCost"

I’ve tried to use:

DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=DataSource1;DDFPATH=:C\MYPATH\DATA;UID=U ser;PWD=UserPW;ACCESSFRIENDLY=YES", acTable, "DataTable", "gbAccessLinkTableCost"


'DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=DataSource1;DB=@DataSource1;DDFPATH=:C\M YPATH\DATA;UID=User;PWD=UserPW;ACCESSFRIENDLY=YES" , acTable, "DataTable", "gbAccessLinkTableCost"

I get “Run-time error ‘3151’: ODBE—connection to ‘DataSource1’ failed.”

I do not know what the problem with Connection String is or what the Connection String should be. When I manually attach the tables I only see the “DataTables” I do not know what it wants me to supply in the DSN= or DB=.

I have created and updated the DDF, because I can link them manually.

I want to be able to use the Pervasive Software ODBC-32 driver supplied by the front-end program. Thank you Gene