We have been having problems retrieving large numbers
from an Oracle DB, and think we have found the cause
(which would potentially affect all DBs). Class Value
has the following lines when fetching NUMERIC or DECIMAL
columns (minor editing to avoid wrapping):

  case Types.NUMERIC:
  case Types.DECIMAL:
    valueObject = new BigDecimal
        (rs.getDouble (columnNumber));
    break;

For a big number, such as 457896321545236412, when the
value is converted to double it becomes 457896321545236032
(these are actual values we got when debugging). It seems
somehow the conversion looses precision, but keeps the
order of magnitude. One possible solution would be to
replace that code with:

  case Types.NUMERIC:
  case Types.DECIMAL:
    valueObject = new BigDecimal
        (String.valueOf(rs.getBigDecimal (columnNumber)));
    break;

Is this a reasonable change? I've never done anything with
Village, other than using it. If it is reasonable, how do I
get this patch into Village? Thanks,


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to