Microsoft KB Archive/926357

= FIX: A System.ArgumentOutOfRangeException exception may occur when you use Host Integration Server 2004 Managed Provider for DB2 to access an IBM DB2 table =

Article ID: 926357

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Host Integration Server 2004 Standard Edition
 * Microsoft Host Integration Server 2004 Enterprise Edition

-



SYMPTOMS
When you use Microsoft Host Integration Server 2004 Managed Provider for DB2 to access an IBM DB2 table, a System.ArgumentOutOfRangeException exception may occur. When this problem occurs, you receive an error message that resembles the following:

System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.

at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)

at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond)

at Microsoft.HostIntegration.MsDb2Client.BindableField.ReadData

at Microsoft.HostIntegration.MsDb2Client.MsDb2DRDAResultSet.Read

at Microsoft.HostIntegration.MsDb2Client.MsDb2DataReader.Read

at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)

at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)

at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)

at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

at Microsoft.HostIntegration.Samples.ManagedDb2Client_2003.frmSQLStatement.btnExecute_Click(Object sender, EventArgs e) in C:\Program Files\Microsoft Host Integration Server\SDK\Samples\DataInt\DataAccess\ManagedDb2Client\SQLStatement.cs:line 438

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The System.ArgumentOutOfRangeException exception is most likely to occur if the following conditions are true:  The IBM DB2 table includes adjacent columns that use the IBM DB2 DATE data type. The IBM DB2 table uses a Unicode code page. For example, the IBM DB2 table uses coded character set identifier (CCSID) 1208.  The columns that use the IBM DB2 DATE data type contain a default DATE value. Specifically, the default DATE value contains the NOT NULL clause and the WITH DEFAULT  clause when the IBM DB2 table is created. For example, the following SQL statement creates an IBM DB2 table that includes the DATE2 column, and the DATE2 column contains this default DATE value. CREATE TABLE TABLE1 (FIRST CHAR(10), SECOND CHAR(10) , DATE1 DATE, DATE2 DATE NOT NULL WITH DEFAULT '1900-01-01') 

Note This problem may also occur when you use Microsoft OLE DB Provider for DB2 to access an IBM DB2 database.



CAUSE
The Host Integration Server 2004 Distributed Relational Database Architecture (DRDA) application requester does not process the IBM DB2 DATE data type correctly if the conditions that are mentioned in the &quot;Symptoms&quot; section are true.



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.

Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.



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
For more information, 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: kbbug kbfix kbqfe kbpubtypekc kbhotfixserver KB926357

-

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

© Microsoft Corporation. All rights reserved.