I have a serious issue with my ODBC Connection to an Informix DB. Trying to connect to the DB leads straight to the following Error and OdbcException.
[HY000] [Informix][Informix ODBC Driver][Informix]Network driver cannot open the network device. (-25574)
This error only appears trying to connect with a c# program. The Connectionstring is
Driver={IBM INFORMIX ODBC DRIVER};Host=xxx;Server=xxx;Service=xxx;Protocol=xxx;Database=xxx;UID=xxx;PWD=xxx
The string has to be ok because its working on my colleagues pc. I've installed the x86 and the x64 bit driver for informix.
The logfile of the odbc connections brings the following error:
dta_302.vshost 10a0-18dc ENTER SQLDriverConnectW
HDBC 0x08428B20
HWND 0x00000000
WCHAR * 0x6F048B34 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x6F048B34
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
dta_302.vshost 10a0-18dc EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
HDBC 0x08428B20
HWND 0x00000000
WCHAR * 0x6F048B34 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x6F048B34
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>
DIAG [HY000] [Informix][Informix ODBC Driver][Informix]Network driver cannot open the network device. (-25574)
DIAG [HY000] [Informix][Informix ODBC Driver][Informix]Network driver cannot open the network device. (-25574)
This is the first error in the logfile and this error comes up as ODBC exception. There are some more errors in the log. It looks like they are because of the first error.
Until now i have uninstalled and installed the drivers several times with no effect. I've reinstalled Visual Studio. I've also changed some permissions of some registry keys told here ERROR : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
The very strange thing is if i add the Informix DB to Visual Studio there is obviously no issue and i can use the connection. A test to the logfile shows that there is the same error as well. It seems it was ignored. Same effect if i use the Adoexplorer to connect. It connects and i can work but the error still comes up to the log. My OS is Windows 7 x64. As i said the same configuration is working fine on my colleagues pc.
I've no idea what else to do now. I would be very thankful if anyone could help me.
Edit: I've to correct me. It seems the Error only appears using the Connection String in the C# Code. There is no Error in the Logfile using the AdoExplorer or connect Database from Visual Studio.
odbcad32.exe
? In "Connection" tab there is "Apply & Test Connection" button. For Win x64 there is separateodbcad32.exe
for 64 and 32 bit applications. The later is in[WinDir]\SysWOW64\odbcad32.exe
. – Michał Niklas