ODBC refuse to take credentials on the fly from a .NET application
Hi!
I'm trying to connect to one of our Ensemble servers Cache database from a C#-windows form . I'm running the client from my local computer with OS win7. Using .NET FW ver 4.5.2 in the client.
ODBC local setup using "InterSystems ODBC35"
In this ODBC konfigurationview i can put my userID and password and try a testconnect (or ping). And that run successful.
However, we don't want to leave credentials in the ODBC-configuration it self (open up for anybody to use the source) but instead send it from the klients.
I have try all three ways from https://www.connectionstrings.com/cache/ and they all return odbc-errors in different ways.
But if i just use: "cn.ConnectionString = "Dsn=MyDSN" it works and it seems to use the credentials configured in DSN.
I'm using Ensemble version 2015.1 local and server i try to connect to via odbc is running ver 2014.x
EDIT 2016-12-31
Problem Solved. Instead of use:
DRIVER={InterSystems ODBC};SERVER=myServerAddress;DATABASE=myDataBase;
UID=myUsername;PWD=myPassword;
I used;
cn.ConnectionString = "Dsn=ODBCNAME;UID=MyUID;PWD=MyPw;";
and that worked out for me
Regards,
Michael Lundberg