Re: ResultSetMetaData.getColumnClassName raises - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: ResultSetMetaData.getColumnClassName raises
Date
Msg-id 1024625353.1481.20.camel@inspiron.cramers
Whole thread Raw
In response to ResultSetMetaData.getColumnClassName raises notImplemented exception  ("Floyd Shackelford" <floyds@4peakstech.com>)
Responses Re: ResultSetMetaData.getColumnClassName raisesnotImplemented exception
Re: ResultSetMetaData.getColumnClassName raises
List pgsql-jdbc
Floyd,

Here is the code

    int sql_type = getField(column).getSQLType();

         switch (sql_type)
        {
               case Types.BIT:
                 return("java.lang.Boolean");
               case Types.SMALLINT:
                 return("java.lang.Integer");
               case Types.INTEGER:
                 return("java.lang.Integer");
               case Types.BIGINT:
                 return("java.lang.Long");
              case Types.NUMERIC:
                 return("java.math.BigDecimal");
               case Types.REAL:
                 return("java.lang.Float");
               case Types.DOUBLE:
                 return("java.lang.Double");
               case Types.CHAR:
               case Types.VARCHAR:
                 return("java.lang.String");
               case Types.DATE:
               case Types.TIME:
               case Types.TIMESTAMP:
                 return("java.sql.Timestamp");
               default:
             throw org.postgresql.Driver.notImplemented();
       }
   }


What kind of column is it you are trying to get?

Dave
On Thu, 2002-06-20 at 16:04, Floyd Shackelford wrote:
>
> i take it that "ResultSetMetaData.getColumnClassName" hasn't been
> implemented yet? i got the following exception when i tried to use it:
>
> This method is not yet implemented.
>  at org.postgresql.Driver.notImplemented(Driver.java:440)
>  at
> org.postgresql.jdbc2.ResultSetMetaData.getColumnClassName(ResultSetMetaData.
> java:476)
>
> Regards,
>
> Floyd Shackelford
> 4 Peaks Technology Group, Inc.
> VOICE: 334.735.9428
> FAX:   916.404.7125
> EMAIL: FloydS@4PeaksTech.com
> ICQ #: 161371538
> acta non verba
>
>




pgsql-jdbc by date:

Previous
From: "Daniele"
Date:
Subject: Store objects
Next
From: "Winter, Wolfgang"
Date:
Subject: timezone incompatibility