Subject Re: Scale Error in FBResultSet?
Author rrokytskyy
--- In Firebird-Java@y..., Agustin Gonzalez <aggonzalez@a...> wrote:
> I had to change line1334 from:
> 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.

Ok, I will check this. Maybe I missed something in the API Guide.

Roman