Year, Month, and Day parameters describe an un-representable DateTime

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
schueler
Posts: 17
Joined: Tue 17 May 2005 15:44
Location: Germany
Contact:

Year, Month, and Day parameters describe an un-representable DateTime

Post by schueler » Fri 01 Jun 2007 10:40

Hello,

I have the following problem with the OraDirect.NET component version CoreLab.Oracle.dll 4.0.13.0 and CoreLab.Data.dll 4.0.8.0:

The selected date value 31.12.4712 00:00:00 works fine on a other database. The version of the database where the select fails is: 10.2.0.2.0 64bit. ConnectionMode direct true/false will fail both.

Do you have any ideas or workarounds ?

Code: Select all

System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
   at System.Data.Common.DataAdapter.OnFillErrorHandler(Exception e, DataTable dataTable, Object[] dataValues)
   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 CoreLab.Oracle.OracleDataAdapter.a(DataTable[] A_0, OracleDataReader A_1, DataSet A_2, String A_3, Int32 A_4, Int32 A_5)

   at CoreLab.Oracle.OracleDataAdapter.a(DataSet A_0, String A_1, IDataReader A_2, Int32 A_3, Int32 A_4)
   at CoreLab.Oracle.OracleDataAdapter.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 CoreLab.Oracle.OracleDataAdapter.a(DataSet A_0, Int32 A_1, Int32 A_2, String A_3, IDbCommand A_4, CommandBehavior A_5)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   at CMP2FlowEngine.Step.DbDataAdapterStep.Run(FlowRunnerStep frs)
   at CMP2FlowEngine.Runner.FlowRunner.RunChildren(FlowRunnerStep Frs)
Thanks,
Rainer

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 01 Jun 2007 11:58

Please send me a small test project to reproduce the problem. It is
desirable to use 'scott' schema objects, otherwise include definition of your own database objects.
Use e-mail address provided in the Readme file.
Do not use third party components.
If it is impossible for you to create test project, post a piece of
your code where the error occurs.

ieichens
Posts: 8
Joined: Wed 16 Jan 2008 08:08

Post by ieichens » Wed 16 Jan 2008 10:52

I am able to reproduce this problem in my database.
In my case the Seconds-Part of the DateVaue is 255.
(OCIDate::OCIDateTime::OCITimeSS).

I have no idea how this value came in, but is there,
as i can check using OCI-Functions.

I am not able to see this illegal value using sqlplus
or using to_char()-conversion. In this case the minutes
ar rounded up.

So the question remains. What about Date Values
which do not represent Valid .NET-DateTime-Values ?

Regards
Ingo

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 17 Jan 2008 12:23

We are investigating this problem.
I will let you know on our progress.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 17 Jan 2008 14:17

Could you send a byte OCIDate struct that you get for “31.12.4712 00:00:00” on 10.2.0.2.0 64bit Oracle server?
Does the error appear again in other place of your code (if the date stays the same)?

ieichens
Posts: 8
Joined: Wed 16 Jan 2008 08:08

Post by ieichens » Thu 17 Jan 2008 17:28

In my case the error does not depend on a particular date or a particular server.
I get it accessing a date value which looks quite normal using sqplus etc.
My example record is about ten years old and 'survived' several
server updates (including exports and imports). The problem seems to be that the internal Oracle Structures for Dates allow illegal Date/Time Values (for example 255 for the seconds
probably much more).
I am not able to produce such a value using simple sql inserts.
Currently i have no idea how to reproduce such values.
But i can copy such records via database links, in my case
from 9.2.0.8 to 11.1.0.6.
I'm currently investigating this problem maybe i can tell more shortly.

All i want to say. Be prepared to fetch illegal date/time values from the database, they may exists.

Ingo

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 18 Jan 2008 14:42

Incorrect values will be processed as DBNull.Value in future builds.

Post Reply