Re: prepared statement call fails

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Larry White <ljw1001(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: prepared statement call fails
Date: 2004-12-05 21:38:36
Message-ID: 41B37FDC.1010101@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Larry White wrote:

> proc = connection.prepareCall("{ ? = call add_country( ? ? ? ? ) }");

You are missing commas between your ? parameter placeholders.

Try:

proc = connection.prepareCall("{ ? = call add_country(?,?,?,?) }");

Otherwise your code looks OK.

It may be useful to turn on statement logging on the server side if you
have more problems -- the JDBC driver is transforming your query and it
can be useful to see exactly what's getting sent to the server.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Larry White 2004-12-05 21:59:15 Re: prepared statement call fails
Previous Message Oliver Jowett 2004-12-05 21:35:45 Re: prepared statement call fails