Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a database and I have to hav

Status
Not open for further replies.

DPUser

Technical User
Oct 17, 2003
16
US
I have a database and I have to have it connect to an external data source through an ODBC connection. I decided to utilize the function transferdatabase like

DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=" & datasource1 & ";UID=" & Uname1 & ";PWD=" & pass1 & ";DATABASE=stamprod_sql", acTable, "exch_tools_trade", "dbo_exch_tools_trade"

datasource1, uname1 and pass1 are variables that hold the values entered from text boxes. I noticed that if I leave off the user name and password and just have the datasource name, it works fine. Why is this? Am I doing something wrong?

Thank you
 
The only thing i can think of is that when you set up you DSN, you did not specify a user name and password. So when you try to connect to it using and user name and password, it blows.

Thanks
Glen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top