Link to home
Start Free TrialLog in
Avatar of c9k9h
c9k9h

asked on

adPromptNever not working with DB2 Connection

I'm trying to get the correct connection string down to connect to a DB2 table that is linked to a query. The connection string itself appears to be correct as it is not throwing any errors, however, I am still getting prompted for a username and password even though it is embedded in the connection string. I've tried this same method with Teradata tables and it works fine...  Any ideas?

Private Sub CalcKim_Click()
Dim cnUDB As ADODB.Connection
Set cnUDB = New ADODB.Connection
With cnUDB
.Provider = "IBMDADB2"
.ConnectionString = "Data Source=DB2PSN;UID=c1teh;PWD=test1"
.Properties("Prompt") = adPromptNever
.Open
End With


This works

as does this:

cnUDB.Open "Provider=IBMDADB2;Data Source=DB2PSN;UID=c1teh;PWD=test1"

no errors, yet still prompting for user and pass...
ASKER CERTIFIED SOLUTION
Avatar of Chuck Wood
Chuck Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial