Reputation: 86
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.
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.
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;"
The above works since the protocol being used is 'drsoctcp'
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:
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
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.
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.
Is there anyone that managed to connect via the onsoctcp protocol with the .NET Informix provider class?
Thanks in advance.
Upvotes: 2
Views: 3518
Reputation: 40726
Did you check ConnectionStrings.com? On this page, they use the onsoctcp
option:
Database=myDataBase;Host=192.168.10.10;Server=db_engine_tcp;Service=1492; Protocol=onsoctcp;UID=myUsername;Password=myPassword;
Upvotes: 1