Example of how to use DATABASE=pubs

  • Thread starter Thread starter Antonio
  • Start date Start date
A

Antonio

I know pubs represents the database name. However I keep
getting a syntax error on the following code!

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=RouteManagerElPaso;UID=;PWD=;DATABASE=dbName", ,
"dbo.Cust", "Antonio"


Thank You in Advance

Antonio
 
You've got an extra comma between the connection string and "dbo.Cust"

You could also try removing the dbo. when specifying the source table.

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=RouteManagerElPaso;UID=;PWD=;DATABASE=dbName", _
"Cust", "Antonio"

or

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=RouteManagerElPaso;Trusted_Connection=yes;" & _
"DATABASE=dbName", "Cust", "Antonio"
 

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

Back
Top