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"
 
Back
Top