On Mon, 15 May 2006, dfx wrote:
I am spending about 10 hours on little problem: to pass a parameter (text) to a PostgreSQL (v. 8.1 on Win2000). The relevant code is: java side: private CallableStatement cs; cs = conn.prepareCall(INSERT_CONGRESSO); cs.setString(1, itemCongresso.getCongresso()); //return a String cs.execute(); ... public static final String INSERT_CONGRESSO = "{SELECT ins_congressoa(?)}";
You're mixing your calling syntax. You need to write either: conn.prepareCall("{ ? = call ins_congressoa(?)}"); or conn.prepareStatement("SELECT ins_congressoa(?)"); Kris Jurka