precision of customised type

precision of customised type

Postby zhuqijun » Tue 11 Oct 2016 09:31

Hello Support,

Our product is using DotConnect for Oracle 9.1.45.

We have customised type like

create or replace
type money as object
(
mv number,
mc char(3),
order member function match(m money) return integer
)
final;

update the value as 1.4 EUR by SQL in sql developper:
Code: Select all
update tassets set moneyattr2= MONEY2(1.4,'EUR').


use dotConnect for Oracle to fetch the value:

c# code:
Code: Select all
  var unit = _reader.GetString(idx);
  var value = _reader.GetDouble(idx + 1);


I expect the value is 1.4, but in fact it is 1.4000000000000001
is it a correct behavior?
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56

Re: precision of customised type

Postby zhuqijun » Wed 12 Oct 2016 01:41

issue seems solved, use GetOracleNumber
zhuqijun
 
Posts: 23
Joined: Fri 05 Jul 2013 06:56


Return to dotConnect for Oracle