Subject | Re: [IB-Java] Re: FBResultSet.getBoolean |
---|---|
Author | Massimo Ferrari |
Post date | 2002-02-12T13:50:11Z |
> ok, but let's assume that column contains 'off'.I agree
> 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 was thinking about creating a possibility ofThat's an idea, but the driver would anyway have to
> 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?
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.
Massimo
__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com