Bonjour Nicolas
The best solution is to use a custom type handler that overrides IBatisNet's DecimalTypeHandler
<typeHandlers>
<typeHandler
type="System.Decimal"
handler="CustomDoubleTypeHanlder" />
</typeHandlers> (in SqlMap.config)
Ron use such a solution to overrides IBatisNet's DateTimeTypeHandler.
<typeHandler
type="System.Decimal"
handler="CustomDoubleTypeHanlder" />
</typeHandlers> (in SqlMap.config)
Ron use such a solution to overrides IBatisNet's DateTimeTypeHandler.
Cheers
-Gilles
On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
Hi
I am migrating my application from MIcrosoft Oracle Provider
(System.Data.OracleClient) to ODP 10.0.4 (Oracle.DataAccess). and I
experiment some problems with NUMBER dbType.
According to the ODP Documentation, NUMBER should be read with the
OracleDataAdapter.GetDecimal() method and not
OracleDataAdapter.GetDouble (). With MS Provider, GetDouble works propoerly
Unfortunately, all my C# objects use double type. with MS Provider, I let
the AutoMapReader map the query result into my object properties. But with
ODP, it does not work anymore :( Indeed, The AutoMapReader still use
GetDouble.
So, Can Ibatis convert decimal to double for me at the mapping step ? Do I
write a Custom Type Handlers ? or is the any other solution more clever ?
Obviously, I can replace in my code all double type to Decimal type, and
add everywhere some Convert.ToDouble to avoid interface modfication but is
is quite boring.
Regards

