Обсуждение: Problem with boolean type

Поиск
Список
Период
Сортировка

Problem with boolean type

От
"Johann Robette"
Дата:
Hi,

I'm using Postgres 8.0 beta 3 and the appropriate JDBC Driver.

I use EJB to create a record in a table containing a Boolean field
"answered".
The EJB method expects a Boolean object so I pass new Boolean(false) in
order to create it as false.

But I get the following error :
java.sql.SQLException: ERROR: column "answered" is of type boolean but
expression is of type text


Any help will be greatly appreciated.

JR



Re: [JDBC] Problem with boolean type

От
Kris Jurka
Дата:

On Thu, 7 Oct 2004, Johann Robette wrote:

> I use EJB to create a record in a table containing a Boolean field
> "answered".
> The EJB method expects a Boolean object so I pass new Boolean(false) in
> order to create it as false.
>
> But I get the following error :
> java.sql.SQLException: ERROR: column "answered" is of type boolean but
> expression is of type text

I don't see how that could be happening.  The attached test works fine for
me and exercises every way I see to set a boolean.  Perhaps the EJB is
internally converting this to a setString() call?  Could you investigate
more into what actual driver calls are being made?

Kris Jurka

Вложения