Re: ResultSetMetaData.getColumnClassName raises

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: floyds(at)4peakstech(dot)com
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: ResultSetMetaData.getColumnClassName raises
Date: 2002-06-21 02:09:13
Message-ID: 1024625353.1481.20.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)4PeaksTech(dot)com
> ICQ #: 161371538
> acta non verba
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Winter, Wolfgang 2002-06-21 06:46:32 timezone incompatibility
Previous Message Floyd Shackelford 2002-06-20 20:04:49 ResultSetMetaData.getColumnClassName raises notImplemented exception