创建ODBC连接字符串时的困惑 [英] Confusion when creating ODBC Conecction string
问题描述
我正在尝试创建一个连接字符串,以便在C#控制台应用程序中使用ODBC.
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
错误[08S01] [Liant] [相对性] [Client] [Client LNA]由于RelServer不在指定的端口号上运行,因此客户端无法访问数据源.请与系统管理员联系以获取帮助.
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?
推荐答案
您好,我在寻找自己的东西时发现了您的问题,现在我已经解决了. 这是您使用示例查找的连接字符串.
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;");
这篇关于创建ODBC连接字符串时的困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!