简体   繁体   English

错误:Informix ODBC驱动程序网络驱动程序无法打开网络设备

[英]Error: Informix ODBC Driver Network driver cannot open the network device

I have a serious issue with my ODBC Connection to an Informix DB. 我与Informix DB的ODBC连接存在严重问题。 Trying to connect to the DB leads straight to the following Error and OdbcException. 尝试连接到数据库直接导致以下错误和OdbcException。

[HY000] [Informix][Informix ODBC Driver][Informix]Network driver cannot open the network device. [HY000] [Informix] [Informix ODBC驱动程序] [Informix]网络驱动程序无法打开网络设备。 (-25574) (-25574)

This error only appears trying to connect with ac# program. 仅在尝试连接ac#程序时出现此错误。 The Connectionstring is 连接字符串是

Driver={IBM INFORMIX ODBC DRIVER};Host=xxx;Server=xxx;Service=xxx;Protocol=xxx;Database=xxx;UID=xxx;PWD=xxx 驱动程序= {IBM INFORMIX ODBC DRIVER};主机= xxx;服务器= xxx;服务= xxx;协议= xxx;数据库= 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. 我已经为informix安装了x86和x64位驱动程序。

The logfile of the odbc connections brings the following error: odbc连接的日志文件带来以下错误:

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. 这是日志文件中的第一个错误,该错误作为ODBC异常出现。 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. 我已经重新安装了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 我还更改了此处告诉的某些注册表项的某些权限错误:[Microsoft] [ODBC驱动程序管理器]找不到数据源名称并且未指定默认驱动程序

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. 非常奇怪的是,如果我将Informix DB添加到Visual Studio,则显然没有问题,并且我可以使用该连接。 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. 如果我使用Adoexplorer进行连接,则效果相同。 It connects and i can work but the error still comes up to the log. 它连接,我可以工作,但错误仍然出现在日志中。 My OS is Windows 7 x64. 我的操作系统是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. 似乎错误仅在C#代码中使用连接字符串出现。 There is no Error in the Logfile using the AdoExplorer or connect Database from Visual Studio. 使用AdoExplorer或从Visual Studio连接数据库,日志文件中没有错误。

I've finally solved this problem! 我终于解决了这个问题!

In my case my programs are saved on a network directory which is connected to my pc. 在我的情况下,我的程序保存在与我的PC连接的网络目录中。 I've copied the exe file on my C: an it works. 我已经将exe文件复制到了我的C:它可以工作。

So the problem must have been that i can't run a program via a network directory. 因此,问题一定是我无法通过网络目录运行程序。 Knowing this the error message "cannot open the network device" makes sense. 知道此错误消息“无法打开网络设备”是有道理的。 I think normally it had to work as well but for now i am happy with it :) 我认为通常它也必须工作,但是现在我对此很满意:)

Thanks for your help. 谢谢你的帮助。

Edit: using the x86 driver 编辑:使用x86驱动程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM