
Signature
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
> > True, although the JDBC driver may have been expecting DD/MM/YYYY
> > instead of the provided MM/DD/YYYY.
>
> I don't see what the JDBC driver has to do with that. Your sample code
> shows an independent little Java program.
DB2 transmits its date values as string values over the wire, at least
that was what showed up when using Wireshark to sniff the local
connection. Unless the DB2 JDBC driver implements its deserialisation
code in a native binary, it will use a similar method to the one
outlined in the sample Java app - hence no exception and also an
explanation for why the dates were off.
Knut Stolze - 20 Feb 2007 20:09 GMT
>> > True, although the JDBC driver may have been expecting DD/MM/YYYY
>> > instead of the provided MM/DD/YYYY.
[quoted text clipped - 5 lines]
> that was what showed up when using Wireshark to sniff the local
> connection.
Yes, that's right.
> Unless the DB2 JDBC driver implements its deserialisation
> code in a native binary, it will use a similar method to the one
> outlined in the sample Java app - hence no exception and also an
> explanation for why the dates were off.
Then the client would have to know how the date string was encoded at the
server. And because many people still insist on not using a sane
formatting for dates, i.e. the ISO format, there is often not a unique way
to get the right results.

Signature
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany