Andres Ledesma wrote:
> According to documentation, java.sql.Types.BOOLEAN is the equivalence of SQL
> BOOLEAN, but a function returning a boolean, returns something matched to
> Types.BIT in java. It happens in the following code.
Types.BIT and Types.BOOLEAN are, as far as I can tell from the JDBC
spec, intended to be interchangeable.
> A CallableStatement Function was executed and the return was of type
> (java.sql.Types=-7) however type=java.sql.Types=16 was registered.
> Types = -7 correspond to Types.BIT
> Types = 16 correspond to Types.BOOLEAN
A workaround is to just register the OUT parameter as Types.BIT, but
yes, the driver shouldn't really complain in this case.
You didn't say which driver version you were using..
In response to
pgsql-jdbc by date
|Next:||From: Andres Ledesma||Date: 2005-08-11 13:49:02|
|Subject: Re: postgresql and java data types mismatch.....|
|Previous:||From: Andres Ledesma||Date: 2005-08-11 13:23:42|
|Subject: postgresql and java data types mismatch.....|