使用 .NET Provider 连接 Informix 数据库

Connecting Informix database with .NET Provider

我用 testconn40 进行了测试,它给了我这些错误。我卸载并重新安装它,错误仍然存​​在。我禁用了我的防火墙。我正在使用本地服务器。在文档中它说的是:

SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP".
Communication API being used: "SOCKETS".
Location where the error was detected: "192.168.1.200".
Communication function detecting the error: "recv".
Protocol specific error code(s): "*", "*", "0". SQLSTATE=08001

*,*,0 表示连接已被对方关闭。这可以是客户端和 DB2 服务器之间的任何网络设备(即防火墙、路由器、工作负载平衡设备等...),或者是 DB2 服务器本身。

我测试了 Informix Server 12.10 Enterprise 试用版,我下载了最后一个修复包 https://www-01.ibm.com/support/docview.wss?uid=swg24043166 只为您的 OS 下载 IBM DATA SERVER CLIENT,我尝试 32 位。请务必在安装程序中启用 DRDA 支持并保存它将使用的端口。

  1. 在etc/services中搜索哪个端口在我的informix服务器中使用drda:dr_informix1210_2 27526/tcp
    1. informix 目录我的例子:C:\Program Files\IBM Informix Software Bundle\etc 打开 sqlhost.informix1210_2 文件。
    2. 将 dr_informix1210_2 drsoctcp "yourcomputername" dr_informix1210_2 更改为此 dr_informix1210_2 drsoctcp 127.0.0.1 dr_informix1210_2
    3. 重启服务器
    4. 运行 命令 netstat -an | findstr 27526
    5. 如果它说它正在监听 运行 命令 testconn40 database=pruebas;server=127.0.0.1:27526;userid=informix;password=1234
    6. 如果它没有监听 DRDA 支持它没有启用,请尝试重新安装在向导中启用它的服务器。
    7. 最后,您可以使用 IBM .NET Provider 连接到 Visual Studio 2015。