Hi again Charles,
> Hi all,
>
> We've just ported a prototype App of ours to DB2/400 - for
> those that don't
> know, DB2/400 is the version of DB2 that runs on the
> AS400/iSeries/zSeries/whatever-IBM-is-marketing-the machines-as-today.
>
> All went very well; the only issue we had to resolve was BIT fields.
> Essentially, the jdbc driver for the AS400 needs to map Booleans to a
> SMALLINT.
>
> We want, however, to keep the same repository.xml for all our
> platforms -
> i.e. keep "BIT" in the field-descriptors in the repository.xml.
>
> Essentially, we've modified the setObjectForStatmenet on
> PlatformDb2Impl to
> :
>
> if (sqlType == Types.TINYINT) {
> ps.setByte(index, ((Byte) value).byteValue());
> } else if (sqlType == Types.BIT) {
> /** Special hack **/
> ps.setObject(index, value, Types.SMALLINT);
> } else {
> super.setObjectForStatement(ps, index, value, sqlType);
> }
>
> (and ditto for setNullForStatemnt)
>
> We don't have access to a "normal" DB2 database at the
> moment, so I can't
> verify that this would work for all DB2s.
>
> Should I
> a) send in the modified DB2PlatformImpl and let someone else
> test it on a
> normal DB2 installation or
> b) create a Db2400PlatformImpl.
I'd prefer b), as it will allow us to do special things for DB2400 if
necessary.
> If the latter, I guess that all I should have to do is change the
> repository.dtd to allow Db2400 as database type. Is this correct ?
Correct!
If you send in your stuff I'll add it to the codebase!
thanks,
Thomas
>
> Cheers,
>
> Charles.
>
>
>
> This email and any attachments are strictly confidential and
> are intended
> solely for the addressee. If you are not the intended
> recipient you must
> not disclose, forward, copy or take any action in reliance on
> this message
> or its attachments. If you have received this email in error
> please notify
> the sender as soon as possible and delete it from your
> computer systems.
> Any views or opinions presented are solely those of the
> author and do not
> necessarily reflect those of HPD Software Limited or its affiliates.
>
> At present the integrity of email across the internet cannot
> be guaranteed
> and messages sent via this medium are potentially at risk.
> All liability
> is excluded to the extent permitted by law for any claims
> arising as a re-
> sult of the use of this medium to transmit information by or to
> HPD Software Limited or its affiliates.
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>