1 message in com.mysql.lists.javaNull Date field
FromSent OnAttachments
alec...@quantel.com04 May 2001 01:43 
Subject:Null Date field
From:alec...@quantel.com (alec@quantel.com)
Date:05/04/2001 01:43:30 AM
List:com.mysql.lists.java

I have a expiry date field in my database, which may be null if no expiry date hsa been set for the item. I thought that the correct way to detemine this was to attempt
to extract the date using ResultSet.getDate() and, before using the returned value, to test
if it was null using ResultSet.wasNull(). But when I do so, I get the following
exception:

java.sql.SQLException: Cannot convert value 'null' from column 8(null ) to DATE. at org.gjt.mm.mysql.ResultSet.getDate(ResultSet.java)

The Sun java documentation says that null should be returned. Is this an error
in the jdbc driver, or have I misinderstood?

Alec Cawley

mysql