Hi,
I found that ResultSet.getDate()/getTime()/getTimestamp() functions do
not return null values if the corresponding column contains a SQL NULL
value. This is in contradiction to
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getDate(int)
which states:
"if the value is SQL NULL, the value returned is null"
In order to make it easier to write compatible code, it would be great
if this could be fixed in SQLiteJDBC.
Example:
Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery("select NULL;");
while (rs.next()) {
System.out.println("date: " + rs.getDate(1));
System.out.println("time: " + rs.getTime(1));
System.out.println("timestamp: " + rs.getTimestamp(1));
}
returns:
date: 1970-01-01
time: 01:00:00
timestamp: 1970-01-01 01:00:00.0
but it should return:
date: null
time: null
timestamp: null
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---