Re: Calling PGSQL Stored function thru JDBC - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Calling PGSQL Stored function thru JDBC
Date
Msg-id Pine.BSO.4.56.0407300128350.4881@leary.csoft.net
Whole thread Raw
In response to Calling PGSQL Stored function thru JDBC  (Nick Selva <mavles_pgsql@yahoo.com>)
Responses Re: Calling PGSQL Stored function thru JDBC
List pgsql-jdbc

On Thu, 29 Jul 2004, Nick Selva wrote:

> [my CallableStatement doesn't work.]

You have misnumbered your parameters.  You want to do cs.setString(2, "P")
because that matches with the second "?", and cs.registerOutParameter(1,
Types.VARCHAR) because that is the out parameter.  You also may need to
say "{ ? = call get_state(?) }", note the equal sign.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Nick Selva
Date:
Subject: Calling PGSQL Stored function thru JDBC
Next
From: "Vianen, Jeroen van"
Date:
Subject: PostgreSQL JDBC + Hibernate lose valuable debug info if an exception is thrown