Informix的.NET连接字符串 [英] Informix .NET Connection String

查看:340
本文介绍了Informix的.NET连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图连接到Informix数据库服务器(V10),我使用Informix数据提供.NET类库建立通过.NET应用程序的连接和检索数据。

I am attempting to connect to an Informix DB server (v10) and I am using the Informix Data Provider .NET class library to establish a connection via a .NET application and retrieve data.

起初,我已经建立了一个Informix服务器在我的本地机器上做与此库的一些测试。有趣的是有2个的情况,其中一个连接字符串工作和一种不

Initially I have set up an Informix server on my local machine to do some testing with this library. Interestingly enough there are 2 scenarios in which one the connection string works and one which does not.

方案1:服务器设为通过的协议drsoctcp连接和连接字符串如下:

Scenario 1: Server is set up to connect via a protocol 'drsoctcp' and the connection string is as follows:

connectionString="Server=my.server.com:9088; Database=mytestdb; User ID=user; Password=mypass; Persist Security Info=True; Authentication=Server;"

由于所使用的协议上面的作品是drsoctcp

The above works since the protocol being used is 'drsoctcp'

方案2:服务器设为通过的协议onsoctcp'和连接字符串连接是完全按照上面。该连接将无法工作,抛出的错误是:

Scenario 2: Server is set up to connect via a protocol 'onsoctcp' and the connection string is exactly as above. The connection will not work and the error thrown is:

错误[08001] [IBM] SQL30081N通信犯错或已   检测。通信协议被用于:TCP / IP。通讯   API正在使用:套接字。被检测到错误的位置:   FE80 :: 1:10 9:C212:ce44%10。通讯功能检测   错误:接收。协议特定的错误code(S):的的,0。   SQLSTATE = 08001

ERROR [08001] [IBM] SQL30081N A communication err or has been detected. Communication protocol being used: "TCP/IP". Communicatio n API being used: "SOCKETS". Location where the error was detected: "fe80::1:10 9:c212:ce44%10". Communication function detecting the error: "recv". Protocol specific error code(s): "", "", "0". SQLSTATE=08001

在'my.server.com'是机器识别LAN上我工作的名称。我也尝试使用localhost或IP地址(包括127.0.0.1和外部IP地址),但仍然没有成功。

The 'my.server.com' is the name of the machine I am working on as identified on the LAN. I also tried to use localhost or the IP address (both 127.0.0.1 and the external IP address) but still no success.

真正的问题在这里:我希望连接到(这是一个不同的网络完全依靠)的Informix服务器可对我来说,通过onsoctcp协议进行连接。

The real issue is here: the Informix server that I wish to connect to (which is on a different network entirely) is available for me to connect only via the onsoctcp protocol.

是否有任何人设法通过onsoctcp协议与.NET的Informix提供者类?

Is there anyone that managed to connect via the onsoctcp protocol with the .NET Informix provider class?

在此先感谢。

推荐答案

你检查ConnectionStrings.com? 在此页面,他们所使用的 onsoctcp 选项:

Did you check ConnectionStrings.com? On this page, they use the onsoctcp option:

数据库= MyDatabase的;主机= 192.168.10.10;服务器= db_engine_tcp;服务= 1492;   协议= onsoctcp; UID =名为myUsername;密码= MYPASSWORD;

Database=myDataBase;Host=192.168.10.10;Server=db_engine_tcp;Service=1492; Protocol=onsoctcp;UID=myUsername;Password=myPassword;

这篇关于Informix的.NET连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆