IBM .net驱动程序找不到db2locale.dll [英] IBM .net driver cannot find db2locale.dll

查看:235
本文介绍了IBM .net驱动程序找不到db2locale.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将.net解决方案的Git存储库拉到同一台计算机上的另一个文件夹中(只是为了确保它能正常工作)。

I'm trying to pull a Git repository of my .net solution over to another folder on the same machine (just to make sure it works).

在我使用的创建 IfxConnection s的项目,当我尝试创建一个新的 IfxConnection 时,我得到一个 DllNotFoundException ,由IBM Informix驱动程序抛出。

In the project I use that creates IfxConnections, when I try to create a new IfxConnection I get a DllNotFoundException, which is thrown by the IBM Informix driver.

我收到的消息是无法加载DLL'db2locale.dll' :找不到指定的模块。(来自HRESULT的异常:0x8007007E),堆栈跟踪(读回构造函数调用)为:

The message I receive is "Unable to load DLL 'db2locale.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" and the stack trace (reading back to the constructor call) is:

at IBM.Data.Informix.UnsafeNativeMethods.IfxInteropAPP.sqloGetNormalizedLangFromLangId(Int16 lcid)
at IBM.Data.Informix.UnsafeNativeMethods.IfxLocale.sqloGetNormalizedLangFromLangId(Int16 lcid)
at IBM.Data.Informix.IfxResource.GetMsgPath(CultureInfo cultureInfo, String szResFileName)
at IBM.Data.Informix.IfxResource..ctor(CultureInfo cultureInfo, String szResFileName, String szMsgPath)
at IBM.Data.Informix.IfxResource..ctor(CultureInfo cultureInfo, String szResFileName)
at IBM.Data.Informix.IfxResources.GetResource(CultureInfo cultureInfo)
at IBM.Data.Informix.IfxResources.GetString(CultureInfo cultureInfo, String stringID)
at IBM.Data.Informix.Res.GetString(CultureInfo culture, String name)
at IBM.Data.Informix.ODC.InvalidArgument()
at IBM.Data.Informix.IfxConnPool.ReplaceConnectionStringParms(IfxConnection connection, String szValue, IfxConnSettings& pSettings, IfxConnSettingsInternal& pSettingsInternal, Boolean bAttach)
at IBM.Data.Informix.IfxConnection.set_ConnectionString(String value)
at IBM.Data.Informix.IfxConnection..ctor(String connectionString)

问题是,我的代码/项目没有直接引用此dll。我的代码在本地计算机路径 C:\Program Files\IBM\IBM\IBM DATA SERVER DRIVER\bin中引用 IBM.Data.Informix \netf40_32\IBM.Data.Informix.dll ,就像在我所有其他项目中以及从中克隆了该存储库的存储库中一样。从存储库中打开原始项目不会产生任何错误。

The thing is, my code/project does not directly reference this dll. My code references IBM.Data.Informix on the local machine path C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\netf40_32\IBM.Data.Informix.dll, as it does in all of my other projects, and in the repository from which this repository has been cloned. Opening the original project from the repository produces no errors.

谁能给我一些深入了解此错误发生的原因以及我该如何解决的信息?

顺便说一句,IBM Informix驱动程序似乎在一定程度上在后台使用了DB2连接代码的 lot 。在其他使用设计人员生成的数据集的项目中,我只能使用DB2连接器类型连接到我的Informix数据库。因此,即使并不清楚为什么这与DB2相关,DB2标记也是如此。

As an aside, the IBM Informix driver seems to use a lot of the DB2 connection code in the background to the extent that, in other projects, which use designer-generated datasets, I can only connect to my Informix database using the DB2 connector type. Hence the DB2 tag, even though it's not immediately obvious why this would be DB2-related.

推荐答案

IBM Informix .NET驱动程序您正在使用的是来自IBM DB2 Data Server Driver软件包的;它不是本机的Informix .NET提供程序。
在理想情况下,如果正确安装了IBM DB2数据服务器驱动程序包,那么您应该不会看到此错误。

The IBM Informix .NET drivers what you are using is from IBM DB2 Data Server Driver package; it is not the native Informix .NET provider. In ideal case if the IBM DB2 Data Server Driver package is installed correctly then you should not see this error.

如果您打算使用本机Informix .NET驱动程序,那么您可能需要取消引用项目中随附的当前二进制文件,然后再引用本机Informix .NET驱动程序。
本地Informix .NET提供程序的位置为$ INFORMIXDIR\bin\netf20\IBM.Data.Informix.dll

If your intention is to use the native Informix .NET drivers then you may need to dereference the current binary that you have included with the project and then make a reference to native Informix .NET drivers. The location of the native Informix .NET provider is $INFORMIXDIR\bin\netf20\IBM.Data.Informix.dll

FYI :
有两种IBM Informix .NET驱动程序,它们具有相同的名称空间(IBM.Data.Informix)和相同的二进制名称(IBM.Data.Informix.dll)。

FYI: There are two flavors of IBM Informix .NET drivers, both of them have same namespace (IBM.Data.Informix) and same binary name (IBM.Data.Informix.dll).

其中一个使用Informix本机(SQLI)协议,另一个使用DRDA协议。
具有本机协议的IBM Informix .NET驱动程序是IBM Informix Client SDK的一部分。
使用DRDA协议的驱动程序是IBM DB2数据服务器驱动程序软件包的一部分。

One of them uses Informix native (SQLI) protocol and the other one uses DRDA protocol. The IBM Informix .NET drivers with native protocol is part of IBM Informix Client SDK The one that uses DRDA protocol is part of IBM DB2 Data Server Driver package.

现在,IBM Informix Client SDK包含IBM DB2数据服务器驱动程序软件包,在安装过程中也作为可选组件。

Now IBM Informix Client SDK includes IBM DB2 Data Server Driver package also as an optional component during the installation.

这篇关于IBM .net驱动程序找不到db2locale.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆