Thread: ResultSetMetaData.getColumnClassName raises notImplemented exception

ResultSetMetaData.getColumnClassName raises notImplemented exception

From
"Floyd Shackelford"
Date:
 
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

 

Re: ResultSetMetaData.getColumnClassName raises

From
Dave Cramer
Date:
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
>
>




Re: ResultSetMetaData.getColumnClassName raisesnotImplemented exception

From
"Floyd Shackelford"
Date:
sql types decimal and text

Regards,

Floyd Shackelford
4 Peaks Technology Group, Inc. <http://www.4peakstech.com/>
VOICE: 334.735.9428
FAX:   916.404.7125
EMAIL: FloydS@4PeaksTech.com <mailto:FloydS@4PeaksTech.com>
ICQ #: 161371538

acta non verba



-----Original Message-----
From: Dave Cramer [mailto:Dave@micro-automation.net]
Sent: Thursday, June 20, 2002 9:09 PM
To: floyds@4peakstech.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] ResultSetMetaData.getColumnClassName
raisesnotImplemented exception


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
>
>



Re: ResultSetMetaData.getColumnClassName raises

From
Jason Davies
Date:
Hi,

Maybe now you could apply my patch that I sent some time ago :-)

It fixes this.

--Jase