JDBC driver: Method not implemented - Mailing list pgsql-jdbc

From Jean-Christian Imbeault
Subject JDBC driver: Method not implemented
Date
Msg-id 3DA6904A.403@mega-bucks.co.jp
Whole thread Raw
List 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



pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: Connection setAutoCommit()
Next
From: Dave Cramer
Date:
Subject: Re: NullPointer error returned from ResultSet.java