Re: getBigDecimal problem

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: getBigDecimal problem
Дата
Msg-id 985175109.3ab894452e13d@webmail.retep.org.uk
обсуждение исходный текст
Ответ на getBigDecimal problem  (svetsch@tradewinds-solutions.com)
Список pgsql-bugs
Quoting svetsch@tradewinds-solutions.com:

> Hi,
>
> We just find out a small bug with the getBigDecimal(int i) method in
> ResultSet (postgresql 7.1 beta6)
>
> Th symptom is :
>
> We cannot read a decimal value with getBigDecimal() although, we can set
> it
>
> We solve the problem temporary by replacing the source original method
>
>     public java.math.BigDecimal getBigDecimal(int columnIndex) throws
> SQLException
>     {
>       // Now must call BigDecimal with a scale otherwise JBuilder barfs
>       return getBigDecimal(columnIndex,0);
>     }
>
> by
>
>     public java.math.BigDecimal getBigDecimal(int columnIndex) throws
> SQLException
>     {
>       // Now must call BigDecimal with a scale otherwise JBuilder barfs
>       return getBigDecimal(columnIndex,-1);
>     }
>
> So it does not perform a setScale in the method getBigDecimal(int
> column,
> int scale)
>
> It works well for us.

Hmmm, that one slipped past me. -1 is the correct figure as the getBigDecimal
(col,scale) method handles scale==-1 as a special case.

Thanks, Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Encoding problem
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Encoding problem