问题
I'm trying to create a connection string in order to work with a ODBC in a C# console application.

var dbConnection = new OdbcConnection("DRIVER={Relativity Client};ServerName=192.168.1.5;Port=21060;Database=Analyzar;UID=USER;PWD=PASSWORD;");
Of course user and password have the right values. But I keep getting this error
ERROR [08S01] [Liant][Relativity][Client][Client LNA]Client cannot access the data source because RelServer is not running at the specified port number. Contact your system administrator for assistance.
Can any one help me with this plz?
回答1:
Hi just found your question while looking for something myself which I have now solved. Here is the Connection String you are looking for using your example.
var dbConnection = new OdbcConnection("DRIVER={Relativity Client};ServerName=192.168.1.5.21060;ServerDSN=Analyzar;UID=USER;PWD=PASSWORD;");
来源:https://stackoverflow.com/questions/11058376/confusion-when-creating-odbc-conecction-string