1
votes

Is there an obvious to semi obvious problem with the connection string that I am attempting to use to connect to informix. I have been using the following guide and different parameters to attempt to build a connection

https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.netpr.doc/ids_net_066.htm

I cannot use the .net native drivers for informix because of the drda protocol requirement. I can build a system dsn and call it directly and it works great. I was trying to find out if I could skip the DSN setup in the ODBC manager and place it in the a config file instead. I am having a problem building a connection string that works using the 4.10 client. My connection string is as follows

string connStr ="CursorBehavior=0;Driver=IBM INFORMIX ODBC DRIVER;DB_LOCALE=en_US.819;Host=xxx.xxx.xxx.xxx; Server=; Service=31012; UID=informix; Password=xxxxxxx; Protocol=olsoctcp;DB=xxxx;Pooling=false";

The error is: Message=ERROR [HY000] [Informix][Informix ODBC Driver][-11302] Insufficient Connection information was supplied ERROR [01S00] [Informix][Informix ODBC Driver]Invalid connection string attribute. ERROR [01S00] [Informix][Informix ODBC Driver]Invalid connection string attribute. ERROR [01S00] [Informix][Informix ODBC Driver]Invalid connection string attribute. ERROR [01S00] [Informix][Informix ODBC Driver]Invalid connection string attribute. ERROR [HY000] [Informix][Informix ODBC Driver][-11302] Insufficient Connection information was supplied

2
Informix does have a .NET set of drivers that use the SQLI protocol instead of DRDA ( Differences between .NET Providers ). For ODBCcheck if you are using the correct keywords ( Connection string keywords that make a connection ).Luís Marques

2 Answers

0
votes

I'm not sure if this is a deliberate or accidental omission in your connection string but a value for the Server attribute is required. Not providing a value will most likely lead to the -11302 error. The value should correspond to either the DBSERVERNAME or one of the DBSERVERALIAS values specified in the Informix server's onconfig file and also match the entry in the server's sqlhosts file that uses tcp port 31012.

0
votes

Try enclosing the driver name in curly braces as follows:

Driver = {IBM INFORMIX ODBC DRIVER}; ...