Importing Table from ODBC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to get the correct syntax for importing a table from an ODBC link.
I pulled the following syntax for a different type of file from this board
but don't know how to modify it for ODBC:

DoCmd.TransferDatabase acImport, "dBase 5.0", "C:\temp", acTable, "member",
"member"

Information from linking the file shows:

DSN=Dev_pes_reporting;DATABASE=pes_reporting . The table name is dboAcc.

I'm trying to automate the import because directly querying the ODBC table
is very slow for some reason, it's much faster to import the table (which I'm
currently doing manually) and then query the copy.
 
here's am option: link to the Dbase table and use that link to create a
temporary table via a make table query (on opening the database, for
example).

Set the database to Compact on Close or else it grows like crazy.

Bob
 
Bob,

Thanks for your response. However, that's what I've been attempting. Using
the make-table query either crashes or takes a very long time while doing an
import seems to always work and doesn't take nearly as long. That's why I am
looking for the code to do the import using VBA.
 
Back
Top