I have installed the Informix Client SDK. Then I created a simple .net console application referencing IBM.Data.Informix.dll. When I call IfxConnection.Open()
it throws an exception.
ERROR [HY000] [Informix .NET provider][Informix]INFORMIXSERVER does not match either DBSERVERNAME or DBSERVERALIASES. sqlerrm(database)
I have seen this post and I can't seem to find the sqlhosts file in the client machine. Also I can't the environment variables mentioned the post as well.
So my questions are:
- How to create the sqlhosts file and where will it be saved? Will this be in the database server or client machine or both?
- What are the environment variables needed?
IfxConnection
? You can connect to the Informix instance without a sqlhosts definition on the client side, but you have to provide the Informix server connection info. – Luís MarquesHost=10.20.30.40; Service=my-service; Server=db_info; Protocol=onsoctcp; Database=mydb; User Id=testuser; Password=******;
– Jeffrey Lua