Ralf,

Thanks fro the tip. I give that a try.

Cheers
Brian
On Nov 8, 2005, at 12:59 AM, Ralf Joachim wrote:

Hi Brian,

to be as portable as possible I would use only column types defined with SQL92 as almost all databases support them. As far as I know this is not
the case with BIT. Therefore I would suggest to use INT or NUMERIC.

Ralf


Brian Schlining schrieb:
Hi All,

I'm porting an application from SQL Server to Apache Derby. The
application uses a table that contains a bit column to store a boolean
type value (0 = false, 1 = true). I've looked through the  Derby
documentation available at http://db.apache.org/derby/docs/10.1/ ref/
and there's not a bit data type in Derby. Any recommendations on what I
should be using in Derby to map bit values?

A little more background:
    My application uses an O/R mapping layer (Castor, http://
www.castor.org) and is meant to be portable across databases, (i.e it
should run on SQL Server, Derby and others without having to modify
code or mapping files.). The application is also being used in a
production environment so changing the bit field on SQL server to
something else isn't really a good option for me. The offending tables
T-SQL is:

CREATE TABLE [dbo].[Media] (
    [id] bigint NOT NULL,
    [ConceptDelegateID_FK] bigint NULL,
    [MediaFileName] varchar(1024) NULL,
    [MediaType] char(5) NULL,
    [PrimaryMedia] bit NULL DEFAULT (0),
    [Credit] varchar(255) NULL,
    [Caption] varchar(1000) NULL,
    CONSTRAINT [PK_Media] PRIMARY KEY([id])
)
GO

BTW, the application in question can be found at http://
vars.sourceforge.net

Cheers
B
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
MBARI
Software Engineer
[EMAIL PROTECTED]
(831)775-1855
http://www.mbari.org/staff/brian


-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message
to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

--

Syscon Ingenieurbüro für
Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
D-72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Email: [EMAIL PROTECTED]
Web:   www.syscon-world.de

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
MBARI
Software Engineer
[EMAIL PROTECTED]
(831)775-1855
http://www.mbari.org/staff/brian


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to