DateTimeOffset broken in 9.5.502

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

DateTimeOffset broken in 9.5.502

Post by PeterUser » Mon 07 May 2018 11:23

Hello

I upgraded to 9.5.502 and saw that DateTimeOffset is broken. I'm using EF6 in .Net 4.6.1.

When I try to write one into the data base, I see this exception:

Code: Select all

System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> Devart.Data.Oracle.OracleException: ORA-01891: Datetime/Interval internal error
   
On read, I get:

Code: Select all

System.ArgumentOutOfRangeException: Der Offset muss zwischen plus und minus 14 Stunden betragen.
Parametername: offset
Since you tend to have a hard time reproducing my errors, I uploaded an example project onto your ftp server. The file is named DateTimeOffset.zip.

Greetings
Peter

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Mon 07 May 2018 13:37

We cannot reproduce the issue at the moment.

Could you please modify https://www.devart.com/pub/t=37115_forum.zip and upload it to ftp://ftp.devart.com (credentials: anonymous / yourEmail) or some other file exchange server?

PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

Re: DateTimeOffset broken in 9.5.502

Post by PeterUser » Mon 07 May 2018 14:41

Funny fact: The only thing I had to change was the connection string.

In the dbMonitor I see

Code: Select all

DECLARE
  updatedRowid ROWID;
BEGIN
INSERT INTO "dttables"("dtcolumn")
VALUES (:p0)
RETURNING ROWID INTO updatedRowid;
OPEN :outParameter FOR SELECT "id" FROM "dttables" WHERE ROWID = updatedRowid;
END;
with the following parameter:

Code: Select all

p0		Input		TimeStampTZ		05/07/2018 16:07:14 +02:00
I tried setting the Culture to InvariantCulture, but that didn't work.

When I revert to 9.4.326 both our examples work and, another funny fact, the SQL I see in dbMonitor is exactly the same as with 9.5.502. Also the parameters look the same.

Any Idea?

Brendan Morgan
Posts: 4
Joined: Tue 08 May 2018 18:22

Re: DateTimeOffset broken in 9.5.502

Post by Brendan Morgan » Tue 08 May 2018 18:25

I am having the exact same issue. I downgraded my version and was able to get it working on v9.5.399.

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Tue 08 May 2018 19:17

Please specify:
1) your connection string (roughly, without credentials)
2) the versions (xx.x) of your Oracle Server and Oracle Client
3) regional settings of your operating system, i.e. Control Panel > Region > the Format drop-down value (a), Location (b), and Language for non-Unicode programs (c)

PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

Re: DateTimeOffset broken in 9.5.502

Post by PeterUser » Wed 09 May 2018 11:52

Hello, here we go:

Connection String:

Code: Select all

user id=LOCALTEST; password=****;server=localoracle; direct=True; sid=XE; persist security info=True; Connection Timeout=2; Unicode=true
Oracle Server:

Code: Select all

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE	12.1.0.2.0	Production  
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
Oracle Client:
TnsPing reports 11.2.0.2.0

Regional settings of Windows 10, x64:
Format: "Deutsch (Deutschland)"
Location: "Deutschland"
Language for non-Unicode programs: "Deutsch (Deutschland)"

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Wed 09 May 2018 13:19

We have reproduced the issue and are investigating it. Looks like it is specific to Oracle 12.1 (Oracle 12.2 works).

We will notify you when it is fixed.

PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

Re: DateTimeOffset broken in 9.5.502

Post by PeterUser » Wed 09 May 2018 13:58

Thanks a lot.

Sounds like an interesting bug :-)

PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

Re: DateTimeOffset broken in 9.5.502

Post by PeterUser » Mon 04 Jun 2018 15:11

Hello

Did you manage to address this issue in 9.5.520?

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Mon 04 Jun 2018 19:02

The bug with using the OracleDbType.TimeStampTZ parameter when working with Oracle 12.1 in the Direct mode is fixed. We have just sent the internal build with the fix to your email.

Brendan Morgan
Posts: 4
Joined: Tue 08 May 2018 18:22

Re: DateTimeOffset broken in 9.5.502

Post by Brendan Morgan » Mon 04 Jun 2018 23:59

Great news! I appreciate the fix and your assistance. I will test out this build shortly.

PeterUser
Posts: 70
Joined: Mon 27 Feb 2017 07:45

Re: DateTimeOffset broken in 9.5.502

Post by PeterUser » Tue 05 Jun 2018 13:33

Hello

My test project works with 9.5.527. Do you recommend this version for use in a production environment, or should I wait for the next official release?

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Wed 06 Jun 2018 13:15

You can use this build with EF6 in your production.

hkrug
Posts: 2
Joined: Thu 23 Jan 2014 09:15

Re: DateTimeOffset broken in 9.5.502

Post by hkrug » Wed 13 Jun 2018 11:02

After upgrading to 9.5.520 of dotConnect for Oracle we recognized the same error.

Could you please tell us when the bug will be finally fixed?
And is it possible that you send us the internal build with the fix for internal testing?

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

Re: DateTimeOffset broken in 9.5.502

Post by Shalex » Thu 14 Jun 2018 08:29

@hkrug
We have answered you by email.

Post Reply