Connecting to Informix database with VS2005  
Author Message
MikePete





PostPosted: .NET Framework Data Access and Storage, Connecting to Informix database with VS2005 Top

I’m trying to connect to an Informix 7.30 database using Visual Studio .NET 2005. The ODBC driver is Informix-CLI 2.5 (32 bit). I can connect with the Server Explorer in VS2005, however when I try to open a connection programmatically I get the following error.

ERROR [S1000] [INTERSOLV] {ODBC Informix driver} Insufficient information to connect to the data source. ERROR [IM006] [Microsoft] [ODBC Driver Manager] Driver’s SQLSetConnectAttr failed ERROR [01000] [Microsoft] [ODBC Driver Manager] The driver doesn’t support the version of ODBC behavior that the application requested (see SQLSetEnvAttr)

Any ideas on how to resolve this error



.NET Development34  
 
 
DMan1





PostPosted: .NET Framework Data Access and Storage, Connecting to Informix database with VS2005 Top

What does your connection string look like It should be like this:

"Driver={Informix-CLI 2.5 (32 Bit)};Server=myserver;Database=mydb;Uid=myUsername;Pwd=myPassword" (www.connectionstrings.com)



 
 
MikePete





PostPosted: .NET Framework Data Access and Storage, Connecting to Informix database with VS2005 Top

I tried numerous different connection strings including the one you sent, however I usally get the same error message. The weird thing is is connected right away with the Server Explorer. The code is good, I connected to a SUPRA database with it, but I could not connect to SUPRA with the Server Explorer. The opposite of the Informix problem. So the Server Explorer must be using something different to make the connections.

Thanks,

Mikepete