DateTimeOffset and "Specified cast is not valid"

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ron_grove
Posts: 5
Joined: Fri 14 Jun 2013 07:29

DateTimeOffset and "Specified cast is not valid"

Post by ron_grove » Wed 26 Jun 2013 09:05

I'm working against a database with a lot of last modified fields defined like this:

Code: Select all

MODIFIED_DATE Timestamp With Time Zone DEFAULT SYSDATE NOT NULL
The linqConnect drivers are identifying this as the type DateTimeOffset which consistently results in InvalidCastExceptions being raised until I change it manually to DateTime. It's can be worked around in my own model by changing the type of course, but I'd like to use LINQPad. When LINQPad gets the schema using the LinqConnect Oracle driver it has the same problem with DateTimeOffset. I can only get a result set if I specifically exclude last modified dates, but they're pretty important so that's not so useful. This is a third party database so I have no control over the fields and have to work with them as is.

Thank you,
Ron

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: DateTimeOffset and "Specified cast is not valid"

Post by MariiaI » Thu 27 Jun 2013 10:06

Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: DateTimeOffset and "Specified cast is not valid"

Post by MariiaI » Tue 20 Aug 2013 06:16

The support for correct retrieving of the TimeSpan and DateTimeOffset values while materializing is added. The changes will be available in the next build of dotConnect for Oracle. We will inform you when it is available for download.

ron_grove
Posts: 5
Joined: Fri 14 Jun 2013 07:29

Re: DateTimeOffset and "Specified cast is not valid"

Post by ron_grove » Thu 29 Aug 2013 20:59

Thank you. Hopefully it'll be out soon. I've had to do pretty much everything in SQL so far because of this.

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Re: DateTimeOffset and "Specified cast is not valid"

Post by Shalex » Mon 02 Sep 2013 06:49

We are going to release the new build this week. We will post here when it is available for download.

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: DateTimeOffset and "Specified cast is not valid"

Post by Helen » Fri 06 Sep 2013 07:45

New version of dotConnect for Oracle 7.9 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).

For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=27875 .

Post Reply