Edmx using oracle ODAC, number large or too small for an Int32. — oracle-tech

    Forum Stats

  • 3,715,654 Users
  • 2,242,821 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Edmx using oracle ODAC, number large or too small for an Int32.

Nerya Member Posts: 1
edited August 2018 in ODP.NET


I work with .net edmx using oracle ODAC,

I have two Oracle DB servers: Test and Production, which are supposed to be identical

I mapped the edmx file from test environment and use it in both environments (test & Production)

I have a field in a table that is defined like this: NUMBER(9)

In test environment each number is selected and updated without any problem

in production environment high numbers (e.g. 345044341) get an error:

"Value was either too large or too small for an Int32."

if I change App.confige and add the follow declaration The problem is solved :



        <add name="int16" value="edmmapping number(4,0)"/>   

        <add name="int32" value="edmmapping number(8,0)"/>

        <add name="int64" value="edmmapping number(10,0)" />



But I do not understand the difference between the DB in the production and tests

The databases look identical,

The DBA team claim that the environment are identical, we try to access the DBs from the same machine, and results are different as explained above.

We suspect the config change could cause effect on more areas, so of course prefer to understand the issue deeply

What causes the error to appear only in production

I prefer not to add the definition to Config



  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 2,751 Employee
    edited August 2018

    ODP.NET and were among the earliest versions that introduced EF number data type mapping. It's possible you're seeing a bug, though it's not clear which ODP.NET version you are using  in production and test since you name two different versions.

This discussion has been closed.