Subject RE: [firebird-support] Boolean Fields
Author Rick DeBay
Rereading
http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/GettingStartedTO
C.fm.html I find that JDBC recommends the SQL-92 BIT datatype, and if
that is not available TINYINT. The value stored in any other type is
driver dependant. I have asked on firebird-java if it can be
configured. Any further discussion will be continued there.

-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Thursday, October 28, 2004 8:21 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Boolean Fields


At 02:29 PM 28/10/2004 -0400, you wrote:

>I originally used the domain suggested in Helen's book, but changed the
>values stored to 'Y' and 'N' to conform to Jaybird's handling of the
>Java Boolean type.
>If there is ever a chance of a Java application accessing your DB, you
>may want to use Y/N.

I think you should double-check this on the firebird-java list. It
would
be extremely surprising if the JDBC standard for Booleans were locked
into
a single, Engllish-language, character convention. It is much more
likely
that there is some property you can set, at either table or connection
level, to tell the driver how to recognise your Boolean convention. I'd
assume that "Y/N" is merely a default.

In IB Objects, for example, you can assign any convention that's
appropriate for your data. At statement level, one sets this property:

MyBooleanField=BOOLEAN=J/N

With this interface, one can also set it globally, according to SQL
type,
domain, or both. For example, with the domain flag included in a set
property named FieldEntryTypes, one can do this at connection level:

D_BOOLEAN=BOOLEAN=1,0

./heLen





Yahoo! Groups Links