Nuno Prospero dos Santos

Mens Agitat Molem - "Mind moves Matter"

SQL Server vs Access

How to import data from SQL Server 2005 to Microsoft Access throw VBA code? Quite simple. The problem is finding the correct SQL connection string:

DoCmd.TransferDatabase acImport, “ODBC”, _
“ODBC;DRIVER=SQL Server;” & _
“UID=username;” & _
“DATABASE=databasename;” & _
“SERVER=server;” & _
“PWD=password“, acTable, “table1“, “table1_copy“, False, True

I lost so many hours figuring out what the hell did “Could not find installable ISAM” means…

Next Post

Previous Post

1 Comment

  1. forexstrat_egy December 2, 2009

    I am definitely bookmarking this page and sharing it with my friends.

    :)

Leave a Reply

© 2024 Nuno Prospero dos Santos

Theme by Anders Norén