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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC - Call Failed Error

Status
Not open for further replies.

princessk1

Programmer
Feb 28, 2002
74
CA
I am trying to connect to the database through an ODBC connection and I am getting the error:
'Run-time error 3146 - ODBC - call failed'
This is the code I am using. I am using the same code with different variable names for the workspace and the connection to connect to a differenct Database and it works fine.

ConnectStr = "ODBC;DATABASE=" + Database + ";UID=" + UserName + ";PWD=" + Password + ";DSN=" + DSN + ";"
Set ws1 = CreateWorkspace("w1", UserName,Password,dbUseODBC)
Set cnn = ws1.OpenConnection("Connection2",dbDriverNoPrompt, , ConnectStr)

The variables are filling with the right values.
Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top