Re: JBuilder 4 QDS problem

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: JBuilder 4 QDS problem
Дата
Msg-id 3C812EB4.5030202@xythos.com
обсуждение исходный текст
Ответ на Re: JBuilder 4 QDS problem  ("Anthony Kwok" <anthonykwok@writeme.com>)
Список pgsql-jdbc
Anthony,

I don't think this is a jdbc problem but standard postgres
functionality.  For example if you do the following in psql you will see
the same error message:

files=# create table test (column1 numeric);
CREATE
files=# select * from test where column1 = 12.2;
ERROR:  Unable to identify an operator '=' for types 'numeric' and
'double precision'
    You will have to retype this query using an explicit cast

thanks,
--Barry


Anthony Kwok wrote:

>I suspect it is JDBC problem because
>
>1. What I have used is only numeric type in PostgreSQL and BigDecimal in Java (via QDS of JBuilder), nothing to do
withdouble. So maybe it gets wrong data type through the JDBC driver 
>
>2. The program is very generic and able to run in DB2 with db2 jdbc driver
>
>  _
> /| Rgds,
>/-|nthony
>
>>-----Original Message-----
>>From: pgsql-jdbc-owner@postgresql.org
>>[mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Dave Cramer
>>Sent: Saturday, March 02, 2002 2:34 AM
>>To: 'Anthony Kwok'; pgsql-jdbc@postgresql.org
>>Subject: Re: [JDBC] JBuilder 4 QDS problem
>>
>>
>>This sort of has nothing to do with the jdbc driver the relevant error
>>message is:
>>
>>Unable to identify an operator '=' for types 'numeric' and 'double
>>precision'
>>
>>This is due to the backend not having an equals operator between your
>>two types
>>
>>Dave
>>
>>-----Original Message-----
>>From: pgsql-jdbc-owner@postgresql.org
>>[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Anthony Kwok
>>Sent: Friday, March 01, 2002 12:18 PM
>>To: pgsql-jdbc@postgresql.org
>>Subject: [JDBC] JBuilder 4 QDS problem
>>
>>
>>Hi,
>>
>>Anyone using the Query Dataset that JBuilder 4.0 provided? I am using
>>PostgreSQL 7.2 with the latest JDBC driver, I defined a table with some
>>NUMERIC fields, e.g. NUMERIC(12,4). When I use the qds to get the data
>>from database, it has no problem. But when I want to save the data using
>>the qds, it cannot run with success. The qds will detect a wrong field
>>type for the numeric field and save fail. The program is working on DB2
>>with related JDBC driver. Anyone can help?
>>
>>The exception:
>>com.borland.dx.sql.dataset.ResolutionException: An error occurred
>>deleting a row in the "po_hdr" table, RmiDbOperation.java:449
>>(2002-02-03 12:01:58,310)
>>See com.borland.dx.sql.dataset.ResolutionException error code:  BASE+2
>>com.borland.dx.sql.dataset.ResolutionException: An error occurred
>>deleting a row in the "po_hdr" table
>>    at com.borland.dx.sql.dataset.ResolutionException.a(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionException.a(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.l.a(Unknown Source)
>>    at com.borland.dx.sql.dataset.QueryResolver.deleteRow(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.a(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.d(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.c(Unknown
>>Source)
>>    at
>>com.borland.dx.sql.dataset.ResolutionManager.saveChanges(Unknown Source)
>>    at
>>com.borland.dx.sql.dataset.ResolutionManager.saveChanges(Unknown Source)
>>    at com.borland.dx.sql.dataset.Database.saveChanges(Unknown
>>Source)
>>    at PkgERP22.Rmi.RmiDbOperation.setVal(RmiDbOperation.java:444)
>>    at
>>PkgERP22.BusinessObject.ERPPurchaseOrderServer.updateDocument(ERPPurchas
>>eOrderServer.java:660)
>>    at java.lang.reflect.Method.invoke(Native Method)
>>    at
>>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
>>    at sun.rmi.transport.Transport$1.run(Transport.java:142)
>>    at java.security.AccessController.doPrivileged(Native Method)
>>    at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
>>    at
>>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
>>    at
>>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
>>va:643)
>>    at java.lang.Thread.run(Thread.java:484)
>>Chained exception:
>>java.sql.SQLException: ERROR:  Unable to identify an operator '=' for
>>types 'numeric' and 'double precision'
>>    You will have to retype this query using an explicit cast
>>
>>    at
>>org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
>>    at org.postgresql.Connection.ExecSQL(Connection.java:398)
>>    at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
>>    at
>>org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
>>    at
>>org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.j
>>ava:113)
>>    at com.borland.dx.sql.dataset.j.b(Unknown Source)
>>    at com.borland.dx.sql.dataset.l.a(Unknown Source)
>>    at com.borland.dx.sql.dataset.QueryResolver.deleteRow(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.a(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.d(Unknown
>>Source)
>>    at com.borland.dx.sql.dataset.ResolutionManager.c(Unknown
>>Source)
>>    at
>>com.borland.dx.sql.dataset.ResolutionManager.saveChanges(Unknown Source)
>>    at
>>com.borland.dx.sql.dataset.ResolutionManager.saveChanges(Unknown Source)
>>    at com.borland.dx.sql.dataset.Database.saveChanges(Unknown
>>Source)
>>    at PkgERP22.Rmi.RmiDbOperation.setVal(RmiDbOperation.java:444)
>>    at
>>PkgERP22.BusinessObject.ERPPurchaseOrderServer.updateDocument(ERPPurchas
>>eOrderServer.java:660)
>>    at java.lang.reflect.Method.invoke(Native Method)
>>    at
>>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
>>    at sun.rmi.transport.Transport$1.run(Transport.java:142)
>>    at java.security.AccessController.doPrivileged(Native
>>Method)[DEBUG] Value of rmiReturn Code in ERPPurchaesOrderServer :301,
>>
>>
>>[ERROR] setPurchaseOrderVal executeQuery Exception
>>com.borland.dx.dataset.DataSetException: Execution of query failed.,
>>ERPPurchaseOrderServer.java:772 (2002-02-03 12:02:00,794)
>>
>>    at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
>>    at
>>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
>>    at
>>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
>>va:643)
>>    at java.lang.Thread.run(Thread.java:484)
>>[ERROR] setPurchaseOrderVal() Excepiton:
>>com.borland.dx.dataset.DataSetException: Execution of query failed.,
>>
>>Thanks!
>>Anthony
>>---------------------------(end of broadcast)---------------------------
>>TIP 3: if posting/reading through Usenet, please send an appropriate
>>subscribe-nomail command to majordomo@postgresql.org so that your
>>message can get through to the mailing list cleanly
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 4: Don't 'kill -9' the postmaster
>>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Anthony Kwok"
Дата:
Сообщение: Re: JBuilder 4 QDS problem
Следующее
От: Chantal Ackermann
Дата:
Сообщение: Re: Postgress 7.2 and j2sdk 1.4.0