Re: Calling PGSQL Stored function thru JDBC

From: Kris Jurka <books(at)ejurka(dot)com>
To: Nick Selva <mavles_pgsql(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Calling PGSQL Stored function thru JDBC
Date: 2004-07-30 06:31:23
Message-ID: Pine.BSO.4.56.0407300128350.4881@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vianen, Jeroen van 2004-07-30 09:59:21 PostgreSQL JDBC + Hibernate lose valuable debug info if an exception is thrown
Previous Message Nick Selva 2004-07-30 04:18:23 Calling PGSQL Stored function thru JDBC