Negative integers with .NET Framework 4.6
Negative integers with .NET Framework 4.6
Hello,
Under .NET Framework 4.6 for every integer field which is negative in the Database (ex : -1) , when we query the database or do even a simple table list of particular model (T) contaning integer field it brings back the positive value (ex: 1) of the integer value in the Model even though the actual value is negative in the DB!
{
DbSet<T> dbSet = mContext.Set<T>();
var entries = dbSet.ToList();
}
Also, upon 'SaveChanges()' on added entity which contains negative value for integer data member, it saves it as a positive one in the DB.
That issue is occurring only on .NET Framework 4.6 RC and 4.6 Preview. Up to .NET Framework 4.5.2 it is working normally.
Database field type : NUMBER
Model field type : int
Oracle Version: 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
DevArt.Data Version: 5.0.1199.0
DevArt.Data.Oracle Version: 8.4.407.0
DevArt.Data.Oracle.Entity Version: 8.4.407.6
This could be a serious issue. Please provide us with feedback as soon as possible.
Best wishes,
Peter
Under .NET Framework 4.6 for every integer field which is negative in the Database (ex : -1) , when we query the database or do even a simple table list of particular model (T) contaning integer field it brings back the positive value (ex: 1) of the integer value in the Model even though the actual value is negative in the DB!
{
DbSet<T> dbSet = mContext.Set<T>();
var entries = dbSet.ToList();
}
Also, upon 'SaveChanges()' on added entity which contains negative value for integer data member, it saves it as a positive one in the DB.
That issue is occurring only on .NET Framework 4.6 RC and 4.6 Preview. Up to .NET Framework 4.5.2 it is working normally.
Database field type : NUMBER
Model field type : int
Oracle Version: 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
DevArt.Data Version: 5.0.1199.0
DevArt.Data.Oracle Version: 8.4.407.0
DevArt.Data.Oracle.Entity Version: 8.4.407.6
This could be a serious issue. Please provide us with feedback as soon as possible.
Best wishes,
Peter
Re: Negative integers with .NET Framework 4.6
We cannot reproduce the issue with the latest (8.4.447) version of dotConnect for Oracle. Please upgrade. If this doesn't help, send us a small test project with the corresponding DDL/DML script for reproducing.
Re: Negative integers with .NET Framework 4.6
Hi Alex,
I have send you an email with provided code sample
I have send you an email with provided code sample
Re: Negative integers with .NET Framework 4.6
Hello,
i have a similar issue. I have a machine with framework 4.5.2, i retrieve Data with dbForge Studio for Oracle Pro (3.7.472) from our Server, all fine.
My second machine at Home-Office with VS2015 RC installed, the identical Query with dbForge Studio for Oracle Pro gives wrong data, all negatives integers are positive.
Here is the table (Oracle 10.2.0.5.0), the field ID returns "false positive".
CREATE TABLE SM.LAB_STATUSVERARBEITUNG (
ID NUMBER(5, 0),
BEZEICHNUNG VARCHAR2(255 BYTE) NOT NULL,
FEHLERSTATUS NUMBER(22, 0) DEFAULT 0 NOT NULL,
CONSTRAINT PK_LAB_STATUSVERARBEITUNG PRIMARY KEY (ID)
)
mfG
Helmut
i have a similar issue. I have a machine with framework 4.5.2, i retrieve Data with dbForge Studio for Oracle Pro (3.7.472) from our Server, all fine.
My second machine at Home-Office with VS2015 RC installed, the identical Query with dbForge Studio for Oracle Pro gives wrong data, all negatives integers are positive.
Here is the table (Oracle 10.2.0.5.0), the field ID returns "false positive".
CREATE TABLE SM.LAB_STATUSVERARBEITUNG (
ID NUMBER(5, 0),
BEZEICHNUNG VARCHAR2(255 BYTE) NOT NULL,
FEHLERSTATUS NUMBER(22, 0) DEFAULT 0 NOT NULL,
CONSTRAINT PK_LAB_STATUSVERARBEITUNG PRIMARY KEY (ID)
)
mfG
Helmut
Re: Negative integers with .NET Framework 4.6
Helmut,
after investigation we have found that the issue comes when code is compiled with the new Roslyn compiler in VS 2015. If you tick ('prefer 32bit') in project settings everything works fine, because the old compiler is used in such situation.
Alex,
please provide us with any feedback as this issue is urgent and needs to be fixed asap. Visual Studio 2015 will be released within 1 week and likewise the .NET 4.6 official framework.
Best wishes,
Peter
after investigation we have found that the issue comes when code is compiled with the new Roslyn compiler in VS 2015. If you tick ('prefer 32bit') in project settings everything works fine, because the old compiler is used in such situation.
Alex,
please provide us with any feedback as this issue is urgent and needs to be fixed asap. Visual Studio 2015 will be released within 1 week and likewise the .NET 4.6 official framework.
Best wishes,
Peter
Re: Negative integers with .NET Framework 4.6
Peter,
we have reproduced the issue with the new Roslyn compiler in VS 2015 in case of the x64 mode. Thank you for the details you have specified. We are investigating the problem. JIC: it persists with a plain ADO.NET as well.
Helmut,
thank you for your report for dbForge Studio for Oracle Pro.
we have reproduced the issue with the new Roslyn compiler in VS 2015 in case of the x64 mode. Thank you for the details you have specified. We are investigating the problem. JIC: it persists with a plain ADO.NET as well.
Helmut,
thank you for your report for dbForge Studio for Oracle Pro.
Re: Negative integers with .NET Framework 4.6
The investigation is in progress. As soon as we have any results, we will let you know.vmakkenz wrote:We also just ran into this issue, any news on when a fix will be available?
Re: Negative integers with .NET Framework 4.6
The bug with processing negative Oracle NUMBER values using the x64 mode in .NET Framework 4.6 is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
With the new build, there will be no need to disable RyuJIT for this particular issue.
JIC: .NET Framework 4.6 has different issues (http://blogs.msdn.com/b/dotnet/archive/ ... k-4-6.aspx), so it's not recommended to use it in the production environment currently.
With the new build, there will be no need to disable RyuJIT for this particular issue.
JIC: .NET Framework 4.6 has different issues (http://blogs.msdn.com/b/dotnet/archive/ ... k-4-6.aspx), so it's not recommended to use it in the production environment currently.
Re: Negative integers with .NET Framework 4.6
dotConnect for Oracle 8.5 is released: http://forums.devart.com/viewtopic.php?f=1&t=32207.
Re: Negative integers with .NET Framework 4.6
Can you provide details on the root cause for that issue?
Microsoft has fixed the RyuJIT issue but old "Devart" Version are still facing the problem. Can you confirm that?
http://blogs.msdn.com/b/dotnet/archive/ ... k-4-6.aspx
Microsoft has fixed the RyuJIT issue but old "Devart" Version are still facing the problem. Can you confirm that?
http://blogs.msdn.com/b/dotnet/archive/ ... k-4-6.aspx
Re: Negative integers with .NET Framework 4.6
dotConnect for Oracle v8.5 includes a fix to work around peculiarity of .NET Framework 4.6 with processing negative Oracle NUMBER values in the x64 mode. Please use v8.5.
Re: Negative integers with .NET Framework 4.6
What do you recommend for the existing customers that already have the software dependency to Devart 8.4 installed, and will get the Microsoft .NET Framework 4.6 at some point from Windows Update?
This has a high risk of messing the database to unrecoverable state.
This has a high risk of messing the database to unrecoverable state.
Re: Negative integers with .NET Framework 4.6
1. Refer to http://blogs.msdn.com/b/dotnet/archive/ ... k-4-6.aspx:
8.5 and higher work with the patch and without it.
2. By Microsoft design, current .NET Framework upgrades are in-place (http://stackoverflow.com/questions/3269 ... -5-works-i).
Software vendors cannot be sure that particular .NET Framework feature will behave exactly in the same way after each in-place upgrade. So a general advice would be: either upgrade both .NET Framework and dotConnect for Oracle, or leave compatible versions (.NET and provider) on a particular workstation. Please contact Microsoft support to find out more information about Windows Update settings.
The dotConnect for Oracle versions released before 8.5 should work with this patch.Update 8/11/2015: We released an updated version of RyuJIT today, which resolves this advisory. The update was released as Microsoft Security Bulletin MS15-092 and is available on Windows Update or via direct download as KB3086251.
8.5 and higher work with the patch and without it.
2. By Microsoft design, current .NET Framework upgrades are in-place (http://stackoverflow.com/questions/3269 ... -5-works-i).
Software vendors cannot be sure that particular .NET Framework feature will behave exactly in the same way after each in-place upgrade. So a general advice would be: either upgrade both .NET Framework and dotConnect for Oracle, or leave compatible versions (.NET and provider) on a particular workstation. Please contact Microsoft support to find out more information about Windows Update settings.
Re: Negative integers with .NET Framework 4.6
Seems like this is fixed in .NET 4.6.1.
It also seems that Microsoft will skip the .NET 4.6 from Windows Update and directly go to 4.6.1.
It also seems that Microsoft will skip the .NET 4.6 from Windows Update and directly go to 4.6.1.