From: | "Dave Cramer" <Dave(at)micro-automation(dot)net> |
---|---|
To: | "'Barry Lind'" <barry(at)xythos(dot)com> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: driver fails to handle strings in query statements properly |
Date: | 2001-10-02 21:46:10 |
Message-ID: | 008001c14b8b$a6d48f10$8201a8c0@inspiron |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Ok, sounds good, I have time and will take care of it.
Dave
-----Original Message-----
From: Barry Lind [mailto:barry(at)xythos(dot)com]
Sent: October 2, 2001 4:21 PM
To: Dave(at)micro-automation(dot)net
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: driver fails to handle strings in query statements properly
Dave,
My thoughts as well. If we encounter an 'unknown' type, just return it
as a String. Do you have time to fix this?
As a work around using an explicit cast should also work: select
container_20_ft_qty AS QTY_OH, 'Container'::text AS NOMENCLATURE
from ue_summary_mtmc where uic = 'WAQJAA'
thanks,
--Barry
Dave Cramer wrote:
> This is coming back from the backend as type unknown. If the single
> quotes are removed it works ok?
>
> I suppose we could return it as a string when we are in doubt? Is this
> reasonable since there are many other types it should be returned as?
>
> Dave
>
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Lora Goldston
> Sent: October 1, 2001 2:33 PM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: [JDBC] driver fails to handle strings in query statements
> properly
>
>
> I am using jdbc7.0-1.2.jar. I am getting a "No class found for
> unkown" when I use strings in my query statements such as 'Container'
> seen in the query below. These queries work fine when I use Oracle or
> MySQL. This looks like a bug to me. I can work around this by
> explicitly casting the string in the query statement like:
> 'Container'::varchar.
>
> *****************Inside LDMSQLPLUGIN About to query db ----> select
> container_20_ft_qty AS QTY_OH, 'Container' AS NOMENCLATURE from
> ue_summary_mtmc
> where uic = 'WAQJAA'
> EEEEEEEEEEEEEEE I caught an exception on resultSet.getObject(i + 1)
-->
>
> Container
> No class found for unknown.
> at org.postgresql.Connection.getObject(Connection.java:621)
> at
org.postgresql.jdbc2.ResultSet.getObject(ResultSet.java:741)
> at
>
org.cougaar.domain.mlm.plugin.ldm.LDMSQLPlugIn.executeSQL(LDMSQLPlugIn.j
> ava:432
> )
>
>
> Is there a fix for this?
>
> Thanks in advance,
>
> Lora Goldston
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2001-10-02 21:49:13 | Re: driver fails to handle strings in query statements properly |
Previous Message | Ray Tomlinson | 2001-10-02 21:43:57 | Re: jdbc download jar is corrupted |