RE: [PATCH] setTimestamp(int, Timestamp) fails on null timestamp

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: "'Dejan Vucinic'" <hotdejan(at)hotmail(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: RE: [PATCH] setTimestamp(int, Timestamp) fails on null timestamp
Date: 2001-07-11 18:38:26
Message-ID: 000001c10a38$accc96e0$0201a8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dejan,

This has already been done in cvs, please get the binaries from

http://jdbc.fastcrypt.com

Dave

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Dejan Vucinic
Sent: July 11, 2001 5:43 PM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] [PATCH] setTimestamp(int, Timestamp) fails on null
timestamp

Greetings,

The 7.1.2 JDBC driver has a bug in setTimestamp(int, Timestamp), it
throws a NullPointerException if the Timestamp is set to null. Looking
at the code, this seems to be the case for the other form of
setTimestamp as well, in both jdbc1/PreparedStatement.java and
jdbc2/PreparedStatement.java. Please insert something like this at the
very beginning of the four methods:

if (null == x) {
set(parameterIndex, "NULL");
return;
}

Thanks,

--dv

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dejan Vucinic 2001-07-11 19:05:52 Re: can't write a BLOB, 7.1.2
Previous Message Barry Lind 2001-07-11 18:36:54 Re: : SQLException.getErrorCode() : Where can I find list of error code and description ?