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
.Provider = "IBMDADB2"
.ConnectionString = "Data Source=DB2PSN;UID=c1teh;PWD=test1"
.Properties("Prompt") = adPromptNever
as does this:
cnUDB.Open "Provider=IBMDADB2;Data Source=DB2PSN;UID=c1teh;PWD=test1"
no errors, yet still prompting for user and pass...