Skip to content

Decimal overflow: bug of Oracle .NET Managed driver #75

@giuliohome

Description

@giuliohome

The Decimal column from Oracle DB can produce an overflow of the corresponding .NET decimal.

Eccezione non gestita: System.InvalidCastException: Cast specificato non valido.
   in Oracle.ManagedDataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
   in Oracle.ManagedDataAccess.Client.OracleDataReader.GetValue(Int32 i)
   in Sql2Xlsx.Oracle.<Read>d__3.MoveNext() in C:\dev\SqlServer\Sql2Xlsx\Oracle.cs:riga 102

A workaround is needed.

// decimal overflow workaround 
field.ObjValue =
    field.DataType == "Decimal"?
    DR.GetDouble(i) :
    DR.GetValue(i);

Please forward and fix the code in the Oracle .NET Managed driver, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions