FIX: You receive an “Error converting data type DBTYPE_DBTIMESTAMP to datetime” error message when you use the OLE DB Provider for DB2 to run a SELECT statement against an IBM DB2 table

Article translations Article translations
Article ID: 936224 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

In Microsoft SQL Server 2005, you use the Microsoft OLE DB Provider for DB2 that is included in Microsoft Host Integration Server to run a SELECT statement against an IBM DB2 table. After you do this, you may receive the following error message:
Msg 8114, Level 16, State 8, Line 1
Error converting data type DBTYPE_DBTIMESTAMP to datetime.
This problem occurs if the SELECT statement specifies two or more columns that are defined as IBM DB2 DATE or IBM DB2 TIME data types. For example, assume that you use the following SELECT statement to query three columns in an IBM DB2 table:
SELECT COL1, COL2, COL3 FROM IBMDB2.TESTDATA.USER1.TABLE1
In this example, this problem occurs if the COL1 and COL2 columns are defined as IBM DB2 DATE or IBM DB2 TIME data types.

The problem does not occur if you format the SELECT statement by using one of the following formats:
  • SELECT * FROM IBMDB2.TESTDATA.USER1.TABLE1
  • SELECT COL1, COL3 FROM IBMDB2.TESTDATA.USER1.TABLE1

CAUSE

This problem occurs because the OLE DB Provider for DB2 does not correctly parse the IBM DB2 DATE and IBM DB2 TIME data types in certain scenarios.

RESOLUTION

OLE DB Provider for DB2 version 1.0 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 this specific problem. 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 Web site:
http://support.microsoft.com/contactus/?ws=support
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.

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.
OLE DB Provider for DB2 version 1.0, 32-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Db2oledb.dll7.0.2551.0521,05625-Apr-200722:21x86
Microsoft.hostintegration.dataaccesslibrary.dll7.0.2551.02,557,35225-Apr-200722:21x86
Microsoft.hostintegration.dataaccesstool.exe7.0.2551.0619,93625-Apr-200722:21x86
Mseidrda.dll7.0.2551.0804,70425-Apr-200722:21x86
Snanls.dll7.0.2551.0107,86425-Apr-200722:21x86
OLE DB Provider for DB2 version 1.0, 64-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformService branch
Db2oledb.dll7.0.2551.0764,76825-Apr-200722:23x64Not Applicable
Microsoft.hostintegration.dataaccesslibrary.dll7.0.2551.02,553,25625-Apr-200722:22x64Not Applicable
Microsoft.hostintegration.dataaccesstool.exe7.0.2551.0615,84025-Apr-200722:22x64Not Applicable
Mseidrda.dll7.0.2551.01,394,01625-Apr-200722:23x64Not Applicable
Snanls.dll7.0.2551.0131,41625-Apr-200722:23x64Not Applicable
Db2oledb.dll7.0.2551.0521,05625-Apr-200722:21x86SYSWOW
Mseidrda.dll7.0.2551.0804,70425-Apr-200722:21x86SYSWOW
Snanls.dll7.0.2551.0107,86425-Apr-200722:21x86SYSWOW

OLE DB Provider for DB2 version 1.0 with Service Pack 1 (SP1) 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 this specific problem. 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 Web site:
http://support.microsoft.com/contactus/?ws=support
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.

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.
OLE DB Provider for DB2 version 1.0 with SP1, 32-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Db2oledb.dll7.0.3041.0523,10408-Jun-200716:40x86
Microsoft.hostintegration.dataaccesslibrary.dll7.0.3041.02,557,35208-Jun-200716:40x86
Microsoft.hostintegration.dataaccesstool.exe7.0.3041.0619,93608-Jun-200716:40x86
Mseidrda.dll7.0.3041.0805,72808-Jun-200716:40x86
Snanls.dll7.0.3041.0107,86408-Jun-200716:40x86
OLE DB Provider for DB2 version 1.0 with SP1, 64-bit versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformService branch
Db2oledb.dll7.0.3041.0767,84008-Jun-200716:41x64Not Applicable
Microsoft.hostintegration.dataaccesslibrary.dll7.0.3041.02,553,25608-Jun-200716:40x64Not Applicable
Microsoft.hostintegration.dataaccesstool.exe7.0.3041.0615,84008-Jun-200716:40x64Not Applicable
Mseidrda.dll7.0.3041.01,395,04008-Jun-200716:41x64Not Applicable
Snanls.dll7.0.3041.0131,41608-Jun-200716:41x64Not Applicable
Db2oledb.dll7.0.3041.0523,10408-Jun-200716:40x86SYSWOW
Mseidrda.dll7.0.3041.0805,72808-Jun-200716:40x86SYSWOW
Snanls.dll7.0.3041.0107,86408-Jun-200716:40x86SYSWOW
OLE DB Provider for DB2 version 1.0 with SP1, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformService branch
Db2oledb.dll7.0.3041.01,404,25608-Jun-200716:41IA-64Not Applicable
Microsoft.hostintegration.dataaccesslibrary.dll7.0.3041.02,557,35208-Jun-200716:41x86Not Applicable
Microsoft.hostintegration.dataaccesstool.exe7.0.3041.0619,93608-Jun-200716:41x86Not Applicable
Mseidrda.dll7.0.3041.01,991,00808-Jun-200716:41IA-64Not Applicable
Snanls.dll7.0.3041.0228,69608-Jun-200716:41IA-64Not Applicable
Db2oledb.dll7.0.3041.0523,10408-Jun-200716:40x86SYSWOW
Mseidrda.dll7.0.3041.0805,72808-Jun-200716:40x86SYSWOW
Snanls.dll7.0.3041.0107,86408-Jun-200716:40x86SYSWOW

Microsoft Host Integration Server 2004

A hotfix is currently not available for Host Integration Server 2004.

Host Integration Server 2006

To resolve this problem, obtain the latest service pack for Host Integration Server 2006. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
979497 How to obtain the latest Host Integration Server 2006 service pack

STATUS

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

MORE INFORMATION

When you use SQL Server 2005 and the OLE DB Provider for DB2 that is included in Host Integration Server 2004 to run the SELECT statement that is described in the "Symptoms" section, you may receive an error message that resembles the following:
Server: Msg 7341, Level 16, State 2, Line 1
Could not get the current row value of column ‘[IBMDB2].[TESTDATA].[USER1].[TABLE1].COL2 from the OLE DB provider ‘DB2OLEDB’. Conversion failed because the data value overflowed the data type used by the provider. OLE DB error trace [OLE/DB Provider
‘DB2OLEDB’ IRowset::GetData returned 0x80040e21: Data status returned from the provider: [COLUMN_NAME=COL2 STATUS=DBSTATUS_E_DATAOVERFLOW]].
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

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.

Properties

Article ID: 936224 - Last Review: October 8, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft Host Integration Server 2006
  • Microsoft Host Integration Server 2004 Standard Edition
Keywords: 
kbautohotfix kberrmsg kbfix kbqfe kbHotfixServer KB936224

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com