Microsoft KB Archive/936224

= 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 ID: 936224

Article Last Modified on 12/5/2007

-

APPLIES TO


 * Microsoft OLE DB Provider for DB2
 * Microsoft Host Integration Server 2006
 * Microsoft Host Integration Server 2004 Standard Edition

-



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.



OLE DB Provider for DB2 version 1.0 hotfix information
A supported hotfix is now 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 service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or 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. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

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, 64-bit versions


OLE DB Provider for DB2 version 1.0 with Service Pack 1 (SP1) hotfix information
A supported hotfix is now 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 service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or 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. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

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.

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



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; 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 &quot;Symptoms&quot; 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.

Keywords: kberrmsg kbfix kbqfe kbpubtypekc kbhotfixserver KB936224

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.