Re: Prepare Statement - Mailing list pgsql-jdbc

From Jie Liang
Subject Re: Prepare Statement
Date
Msg-id E7E213858379814A9AE48CA6754F5ECB034519CD@mail01.stbernard.com
Whole thread Raw
In response to Prepare Statement  ("Jie Liang" <jie@stbernard.com>)
List pgsql-jdbc
It works.
Thanks.

Jie Liang

-----Original Message-----
From: Oliver Jowett [mailto:oliver@opencloud.com]
Sent: Friday, June 18, 2004 6:39 PM
To: Jie Liang
Cc: Kris Jurka; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] Prepare Statement


Jie Liang wrote:
> Nope, it will get same error msg:
> Myfunction(text) does net exist

Hm, indeed. I just looked at the code and the plain setObject() path
seems slightly broken: it always passes PG_TEXT, not the PGobject's
type.

However, the setObject variant that takes a target SQL type seems ok.
Try this:

>    stmt.setObject(1, obj, Types.OTHER);

-O

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Prepare Statement
Next
From: Dave Cramer
Date:
Subject: Re: proposal for CallableStatements to handle multiple out