Groups > BEA > BEA AquaLogic > Re: modeling a boolean value in an Oracle database




Re: modeling a boolean value in an Oracle database

Re: modeling a boolean value in an Oracle database
Fri, 2 May 2008 14:25:28 -0700
Need more details.  The database column should be Bit type.  But Oracle does not
support Bit type - so this won't work if you are using Oracle ( you could try
defining the column as NUMBER(1) and hoping that
preparedStatement.setBoolean/getBoolean work on that, then hacking the ALDSP
metadata and schema  to indicate that the db column is Bit type. I do not know
offhand what the metadata for Bit type should look like).

I tried the above using the ONLINE_STATEMENT element of CUSTOMER.ds created from
dspSampleSource RTLCUSTOMER.CUSTOMER  - I simply changed the xs:short to
xs:boolean in the CUSTOMER.ds metadata and CUSTOMER.xsd - and it seems to work -
 reported as 'true' and when I update to 'false', it gets read back as 'false'.
This is with Pointbase - I'm hoping your database behaves the same. 

If you are using Sybase/SQL Server - it looks like it does support Bit type
Post Reply
about | contact