Subject Re: [IB-Java] Re: FBResultSet.getBoolean
Author Massimo Ferrari
> ok, but let's assume that column contains 'off'.
> Then what? Well.. I
> think this is just matter of taste. I prefer to
> check the complete
> string to case insensitive equality to 'y', 'yes',
> 't', 'true', '1'
> and 'on' rather then to the first letter of the
> string, as well as
> to 'n', 'no', 'f', 'false', '0' and 'off' and throw
> SQLException in
> all other cases.
I agree

> I was thinking about creating a possibility of
> specifying the
> conversion scheme with the connection parameters.
> You do pass
> properties when obtaining the connection, so why do
> not specify the
> default values for true and false there too?
That's an idea, but the driver would anyway have to
decide what string to write in case of a CHAR(1),
CHAR(2), ... VARCHAR field).
I.e., if the default would be "true", the driver
should write "tr" to a CHAR(2) field, and this 'length
checking' should be implemented in getBoolean too.

Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!