Transferdatabase - database type

M

Michael

Hi,
I am trying to write a codes to auto export tables and data from SQL Server
2000 to Access2000 database.
by using:

docmd.TransferDatabase acImport, "SQL Server", ....

but I cannot make it works according to the Access online Help document .
Can anyone give a sample for how to write this cmd parameters?

Thanks
Michael
 
C

Cheryl Fischer

Michael,

"SQL Server" is not one of the Database Types that will work with the
TransferDatabase method. The types acceptable are:

Microsoft Access (default)
Jet 2.x
Jet 3.x
dBase III
dBase IV
dBase 5.0
Paradox 3.x
Paradox 4.x
Paradox 5.x
Paradox 7.x
ODBC Databases

Here is an MSDN link with more information:

http://tinyurl.com/2gkj7

VBA Help in Access 2002 offers the following example for using
TransferDatabase with an ODBC database. I don't have a SQL Server database
handy to test this with, but try changing "acLink" to "acImport" (leave out
the quotes, of course) in the following sample:

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=DataSource1;UID=User2;PWD=www;LANGUAGE=us_english;" _
& "DATABASE=pubs", acTable, "Authors", "dboAuthors"


hth,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top