Exception: GetTimeSpan() String was not recognized as a va

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
goethals.f
Posts: 60
Joined: Mon 18 May 2009 13:17

Exception: GetTimeSpan() String was not recognized as a va

Post by goethals.f » Tue 27 Mar 2012 10:06

Hello,

Today I got the exception "String was not recognized as a valid TimeSpan" when trying to read an oracle column which is specified as

TIME_ELAPSED INTERVAL DAY(2) TO SECOND(6)


When debuging my code:

The following statement

Code: Select all

tmpResultOracleReader[10] 


shows in my watch-window that this is an object {System.Timespan}, and it holds the correct values (days, hours, seconds, etc...)
so this seems OK

But when i try the following code

Code: Select all

tmpResultOracleReader.GetTimeSpan(10)
then my watch-window shows the System.formatException ("String was not recognized as a valid TimeSpan.)


--> why does the .GetTimeSpan(...) method of the Devart.Data.Oracle.OracleDataReader object doesn't return a correct timestamp, but the simple indexer does ???

[/code]

thx
Fred

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Wed 28 Mar 2012 13:24

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Tue 03 Apr 2012 15:32

We have fixed the bug with using the OracleDataReader.GetTimeSpan method for INTERVAL DAY TO SECOND column. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Fri 13 Apr 2012 08:08

The new build of dotConnect for Oracle 6.80.341 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23886

Post Reply