Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"Un-representable DateTime" error when you use OLEDB Provider for DB2 in Host Integration Server 2013


View products that this article applies to.

Symptoms

Consider the following scenario:

  • In Microsoft Host Integration Server 2013, you configure a DB2 table.
  • The table contains a Timestamp column that has a time value of 24:00:00.
  • You try to select the Timestamp column by using the OLEDB Provider for DB2.
In this scenario, the request fails and returns the following exception:

System.ArgumentOutOfRangeException was unhandled : HResult=-2146233086
Message=Hour, Minute, and Second parameters describe an un-representable DateTime.

↑ Back to the top


Cause

This problem occurs because a time value of 24:00:00 is invalid in Microsoft SQL Server.

↑ Back to the top


Resolution

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:

http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS

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.

Prerequisites

You must have Cumulative Update 2 for Microsoft Host Integration Server 2013 installed to apply this hotfix. For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

Cumulative update information

The fix for this problem is included in cumulative update package 3 for Host Integration Server 2013. For more information about how to obtain the cumulative update package, see Cumulative update package 3 for Host Integration Server 2013.

↑ Back to the top


Workaround

To work around this problem, you can interpret the Timestamp column value as text. To do this, you must set the DateTime As Char connection string parameter to True. For example, set this string as follows:

DateTime As Char = True

↑ Back to the top


More Information

If the hours value in a Timestamp column is 24:00, an adjustment from the DB2 format to the MSSQL format creates a one-day increase. For example, a value of "2015-08-26-24.00.00.000000" on the DB2 side is adjusted to "2015-08-27-00.00.00.000000" on the MSSQL side.

↑ Back to the top


Status

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

↑ Back to the top


Keywords: kbqfe, kbsurveynew, kbhotfixserver, kbautohotfix, kb

↑ Back to the top

Article Info
Article ID : 3064548
Revision : 1
Created on : 1/7/2017
Published on : 9/30/2015
Exists online : False
Views : 279