Error Fill Datatable

Error Fill Datatable

Postby 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 ?
JayXXX
 
Posts: 1
Joined: Tue 21 Sep 2010 07:08

Postby 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);
}
Shalex
Devart Team
 
Posts: 7705
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle