You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.NET 11 change leads to invalid decimal values read from database #240
On .NET 11, every AseDataReader read path returns DECIMAL / NUMERIC values with ~28 digits of floating-point noise.
To Reproduce
usingAdoNetCore.AseClient;usingvarcn=newAseConnection("...");cn.Open();usingvarcmd=cn.CreateCommand();cmd.CommandText="SELECT CAST(123.45 AS DECIMAL(10,2))";usingvarrd=cmd.ExecuteReader();rd.Read();Console.WriteLine(rd.GetValue(0));// boxed decimalConsole.WriteLine(rd.GetDecimal(0));Console.WriteLine(rd.GetString(0));Console.WriteLine(rd.GetDouble(0));
CAST(123.45 AS DECIMAL(10,2)):
read path
.NET 10.0.12
.NET 11.0.0
GetValue
123.45
123.45000000000000256981935710
indexer rd[0]
123.45
123.45000000000000256981935710
GetProviderSpecificValue
123.45
123.45000000000000256981935710
GetDecimal
123.45
123.45000000000000256981935710
GetString
123.45
123.45000000000000256981935710
GetDouble
123.45
123.45
GetFieldType
System.Decimal
System.Decimal
CAST(12.34 AS MONEY) is exact on both runtimes across every path, so whatever the MONEY path does is unaffected.
Wider values lose real precision rather than just gaining noise — CAST(12345678901234.5678 AS NUMERIC(38,10)):
read path
.NET 10.0.12
.NET 11.0.0
GetDecimal
12345678901234.5678
12345678901234.568391626365046
GetDouble
12345678901234.568
12345678901234.568
So on .NET 10 the DECIMAL/NUMERIC path carries more than double precision, and on .NET 11 the digits past double precision are gone from every path — a consumer cannot recover them.
Environment
AdoNetCore.AseClient 0.19.2
SAP ASE 16.1
Windows 10, x64
.NET 10.0.12 and .NET 11.0.0
Impact
Any consumer reading a DECIMAL or NUMERIC column on .NET 11 gets a wrong value, silently.
Activity
Gate the three Sybase tests the AseClient decimal defect breaks
Tests: compare SumClampedValues totals within the decimal tolerance
Add .NET 11 support, drop .NET 8 and 9 (#5942)
LibRed managed Access provider (#5956)