Datatype inconsistency
Posted: Wed 18 Jul 2012 14:00
Hello,
I used the following page to map c# numbers with oracle numbers :
http://www.devart.com/dotconnect/oracle ... pping.html
In part "Oracle to .NET type mapping", it's said that NUMBER(2)..NUMBER(9) maps with int32
In part ".NET to Oracle default type mapping", it's said that int32 maps with number(10)
Number(10) has to be used to be able to store int32 max value, but the column is then considered by the provider as an int64, which leads to a cast issue in my application.
I used the mapping override OracleConnection.NumberMappings to fix my problem, but you should probably have a look at this.
Thanks,
Yoann
I used the following page to map c# numbers with oracle numbers :
http://www.devart.com/dotconnect/oracle ... pping.html
In part "Oracle to .NET type mapping", it's said that NUMBER(2)..NUMBER(9) maps with int32
In part ".NET to Oracle default type mapping", it's said that int32 maps with number(10)
Number(10) has to be used to be able to store int32 max value, but the column is then considered by the provider as an int64, which leads to a cast issue in my application.
I used the mapping override OracleConnection.NumberMappings to fix my problem, but you should probably have a look at this.
Thanks,
Yoann