Error Fill Datatable

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JayXXX
Posts: 1
Joined: Tue 21 Sep 2010 07:08

Error Fill Datatable

Post by JayXXX » Tue 21 Sep 2010 07:41

I'm currently using dotConnect for Oracle 5.70 Express
I got error : "Year, Month, and Day parameters describe an un-representable DateTime."
It occured when filling data into Datatable from OracleDataAdapter which queried table contains a datetime field with Null value.
When I exclude this datetime field in the query, the error didn't appear.
Is it Bug or I have done wrong in my code ?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 22 Sep 2010 13:14

Please tell us how we should modify this sample to reproduce the error.

Code: Select all

DROP TABLE TIMESTAMPTABLE;
CREATE TABLE TIMESTAMPTABLE (
  COL1 TIMESTAMP(6));
INSERT INTO TIMESTAMPTABLE VALUES (NULL);

Code: Select all

using (OracleConnection conn = new OracleConnection(connStr)) {
    OracleDataAdapter myAdapter = new OracleDataAdapter("SELECT * FROM TIMESTAMPTABLE", conn);
    DataTable table = new DataTable();
    myAdapter.Fill(table);
}

Post Reply