Page 1 of 2

DateTimeOffset broken in 9.5.502

Posted: Mon 07 May 2018 11:23
by PeterUser
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

Re: DateTimeOffset broken in 9.5.502

Posted: Mon 07 May 2018 13:37
by Shalex
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?

Re: DateTimeOffset broken in 9.5.502

Posted: Mon 07 May 2018 14:41
by PeterUser
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?

Re: DateTimeOffset broken in 9.5.502

Posted: Tue 08 May 2018 18:25
by Brendan Morgan
I am having the exact same issue. I downgraded my version and was able to get it working on v9.5.399.

Re: DateTimeOffset broken in 9.5.502

Posted: Tue 08 May 2018 19:17
by Shalex
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)

Re: DateTimeOffset broken in 9.5.502

Posted: Wed 09 May 2018 11:52
by PeterUser
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)"

Re: DateTimeOffset broken in 9.5.502

Posted: Wed 09 May 2018 13:19
by Shalex
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.

Re: DateTimeOffset broken in 9.5.502

Posted: Wed 09 May 2018 13:58
by PeterUser
Thanks a lot.

Sounds like an interesting bug :-)

Re: DateTimeOffset broken in 9.5.502

Posted: Mon 04 Jun 2018 15:11
by PeterUser
Hello

Did you manage to address this issue in 9.5.520?

Re: DateTimeOffset broken in 9.5.502

Posted: Mon 04 Jun 2018 19:02
by Shalex
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.

Re: DateTimeOffset broken in 9.5.502

Posted: Mon 04 Jun 2018 23:59
by Brendan Morgan
Great news! I appreciate the fix and your assistance. I will test out this build shortly.

Re: DateTimeOffset broken in 9.5.502

Posted: Tue 05 Jun 2018 13:33
by PeterUser
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?

Re: DateTimeOffset broken in 9.5.502

Posted: Wed 06 Jun 2018 13:15
by Shalex
You can use this build with EF6 in your production.

Re: DateTimeOffset broken in 9.5.502

Posted: Wed 13 Jun 2018 11:02
by hkrug
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?

Re: DateTimeOffset broken in 9.5.502

Posted: Thu 14 Jun 2018 08:29
by Shalex
@hkrug
We have answered you by email.