The following throws a NullPointerException in set Date():
---
PreparedStatement prep = conn.prepareStatement("SELECT ?,?,?");
prep.setDate(1, null);
prep.setTime(2, null);
prep.setTimestamp(3, null);
ResultSet rs = prep.executeQuery();
while (rs.next()) {
System.out.println("date: " + rs.getDate(1));
System.out.println("time: " + rs.getTime(2));
System.out.println("timestamp: " + rs.getTimestamp(3));
}
---
The expected behaviour would be to set SQL NULL values. That is also
what the MySQL JDBC driver does.
So my proposal would be to extend these functions (setDate, setTime
and setTimestamp) to handle null values.
Regards,
Thomas
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---