From: Andres Olarte <olarte.andres@gmail.com>
To: Thomas Frieling <frieling@8hertz.de>
To: pgsql-jdbc@postgresql.org
Subject: Re: CallableStatements: index starts at 2
Date: Wed, 14 Dec 2005 10:38:24 -0600
Message-ID: <3fccaa690512140838o464dd369y4194a05c4f28d553@mail.gmail.com> (raw)
In-Reply-To: <439FFA76.1070706@8hertz.de>
References: <439FFA76.1070706@8hertz.de>
You probably should use prepareStatement instead of prepareCall. I had the
same problem. You can search the archives to look for a better explanation
which I don't remmember right now
On 12/14/05, Thomas Frieling <frieling@8hertz.de> wrote:
>
> It seems that in Version "8.2dev-500 JDBC 3" CallableStatements are
> implemented differently from older Versions.
> The index to set fields now starts at 2.
>
> This _did_ work:
> CallableStatement cS = con.prepareCall("{ call test(?)}";
> cS.setString( 1, "abc" );
>
> This _now_ works:
> CallableStatement cS = con.prepareCall("{ call test(?)}";
> cS.setString( 2, "abc" );
>
> Thanks,
> Thomas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: olarte.andres@gmail.com, frieling@8hertz.de
Subject: Re: CallableStatements: index starts at 2
In-Reply-To: <3fccaa690512140838o464dd369y4194a05c4f28d553@mail.gmail.com>
References: <439FFA76.1070706@8hertz.de> <3fccaa690512140838o464dd369y4194a05c4f28d553@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox