Subject | getObject do not return NULL |
---|---|
Author | Henner Kollmann |
Post date | 2002-02-28T07:41:29Z |
Hello,
found a bug in Interclient 2.01:
the function getObject do not return NULL if values in the db are NULL
JDBC doc says:
'public Object getObject(String columnName)
throws SQLException
...
This method will return the value of the given column as a Java object.
The type of the Java object will be the default Java
object type corresponding to the column's SQL type, following
the mapping for built-in types specified in the JDBC
specification.
If the value is an SQL NULL, the driver returns a Java null. ' <--- here
it
is!
I patched the source in ResultSet.java:
synchronized public Object getObject (int column) throws
java.sql.SQLException
{
// 20020222-HKK: JDBC 2.0 compliant!!!
if (isNullPreamble (column))
return null;
Maybe someone could change this in source?
Thanks
Henner Kollmann
found a bug in Interclient 2.01:
the function getObject do not return NULL if values in the db are NULL
JDBC doc says:
'public Object getObject(String columnName)
throws SQLException
...
This method will return the value of the given column as a Java object.
The type of the Java object will be the default Java
object type corresponding to the column's SQL type, following
the mapping for built-in types specified in the JDBC
specification.
If the value is an SQL NULL, the driver returns a Java null. ' <--- here
it
is!
I patched the source in ResultSet.java:
synchronized public Object getObject (int column) throws
java.sql.SQLException
{
// 20020222-HKK: JDBC 2.0 compliant!!!
if (isNullPreamble (column))
return null;
Maybe someone could change this in source?
Thanks
Henner Kollmann