Subject | Re: Scale Error in FBResultSet? |
---|---|
Author | rrokytskyy |
Post date | 2002-02-20T09:55:11Z |
--- In Firebird-Java@y..., Agustin Gonzalez <aggonzalez@a...> wrote:
Roman
> I had to change line1334 from:Ok, I will check this. Maybe I missed something in the API Guide.
> return BigDecimal.valueOf(((Long)row[columnIndex -
> 1]).longValue(), getXsqlvar(columnIndex).sqlscale);
> to
> return BigDecimal.valueOf(((Long)row[columnIndex -
> 1]).longValue(), -getXsqlvar(columnIndex).sqlscale);
>
> to make NUMERIC(18,2) work. getXsqlvar(columnIndex).sqlscale
> returns a negative number (-2) and the method BigDecimal.valueOf
> does not like that. So I multiplied by -1 to make it positive.
Roman