FIX: A System.InvalidCastException exception may occur when you run an application that uses Microsoft OLE DB Provider for DB2 in a Microsoft Host Integration Server 2010 environment


In a Microsoft Host Integration Server 2010 environment, you have an application that uses Microsoft OLE DB Provider for DB2. When you run the application, the application may fail. Additionally, you receive the following exception:
For example, this problem occurs in the following scenario:
  • The application runs a query against the DB2 database by using Microsoft ADO.NET.
  • You have IBM DB2 for z/OS version 8 installed.
  • The query contains a SELECT statement that resembles the following:
    SELECT xxx, yyy, CAST(zzz as VARCHAR(3998) AS BIT DATA) FROM ......
In this scenario, you receive an exception that contains the following error message:

The data value could not be converted for reason other than sign mismatch or data overflow. For example, the data was corrupted in the data store but the row was still retrievable.


Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.


You must have Microsoft Host Integration Server 2010 installed to apply this hotfix.

Restart information

You do not have to restart the computer after you apply this hotfix.

Replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

For Microsoft Host Integration Server 2010, 32-bit Edition
File nameFile versionFile sizeDateTimePlatform
Db2oledb.dll8.5.4274.2640,84817-Mar-2011 12:25x86
Ddmstr.dll8.5.4274.267,40817-Mar-2011 12:25x86
Ipresync.dll8.5.4274.2526,16817-Mar-2011 12:25x86
Microsoft.hostintegration.dataaccesslibrary.dll8.5.4274.21,300,37617-Mar-2011 12:25x86
Microsoft.hostintegration.drdalink.dll8.5.4274.258,76017-Mar-2011 12:25x86
Microsoft.hostintegration.msdb2client.dll8.5.4274.2255,88817-Mar-2011 12:25x86
Microsoft.hostintegration.msdb2entityclient.dll8.5.4274.2395,16017-Mar-2011 12:25x86
Microsoft.hostintegration.mshostfileclient.dll8.5.4274.2194,45617-Mar-2011 12:25x86
For Microsoft Host Integration Server 2010, 64-bit Edition
File nameFile versionFile sizeDateTimePlatform
Db2oledb.dll8.5.4274.2640,84817-Mar-2011 12:36x86
Db2oledb.dll8.5.4274.2897,87217-Mar-2011 12:36x64
Ddmstr.dll8.5.4274.255,63217-Mar-2011 12:36x64
Ddmstr.dll8.5.4274.267,40817-Mar-2011 12:36x86
Ipresync.dll8.5.4274.2717,65617-Mar-2011 12:36x64
Microsoft.hostintegration.dataaccesslibrary.dll8.5.4274.21,300,37617-Mar-2011 12:36x86
Microsoft.hostintegration.drdalink.dll8.5.4274.258,76017-Mar-2011 12:36x86
Microsoft.hostintegration.drdalink.dll8.5.4274.269,00017-Mar-2011 12:36x64
Microsoft.hostintegration.msdb2client.dll8.5.4274.2255,88817-Mar-2011 12:36x86
Microsoft.hostintegration.msdb2entityclient.dll8.5.4274.2395,16017-Mar-2011 12:36x86
Microsoft.hostintegration.mshostfileclient.dll8.5.4274.2194,45617-Mar-2011 12:36x86
Msdrda.dll8.5.4274.21,695,56817-Mar-2011 12:36x64
Msdrda.dll8.5.4274.2976,72017-Mar-2011 12:36x86
Note Because of file dependencies, the most recent fix that contains these files may also contain additional files.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

ID d'article : 2502542 - Dernière mise à jour : 22 avr. 2011 - Révision : 1