JDBC driver: Method not implemented

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: JDBC driver: Method not implemented
Date: 2002-10-11 08:48:10
Message-ID: 3DA6904A.403@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I got this error while writing some code ...

This method is not yet implemented.
at org.postgresql.Driver.notImplemented(Driver.java:440)
at
org.postgresql.jdbc2.ResultSetMetaData.getColumnClassName(ResultSetMetaData.java:476)

I guess this means that not all of the MetaData methods or implemented
yet in the jdbc2 driver?

The reason I ask is that I have a column of type date and Java does not
seem to recognize it and gives it a Class type of null ...

Does Java have trouble recognizing pg's date type as a date Class?

I use ResultSet.getObject() to load in my data into a TableModel and
this method to retrieve what Class a particular column is:

public Class getColumnClass(int col) {
Class c = null;
try {c = getValueAt(0, col).getClass();}
catch (Exception e) {}
if (c == null) {
System.out.println("COL " + col + " was NULL");
try {
c = Class.forName("java.lang.String");
}
catch (ClassNotFoundException e) {}
}
return c;
}

For column of type date, the reported Class is always null ... this is a
small problem for me :)

Jc

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-10-11 10:05:14 Re: NullPointer error returned from ResultSet.java
Previous Message Barry Lind 2002-10-11 00:54:41 Re: Connection setAutoCommit()