From: thomas at tada.se (Thomas Hallgren) Date: Wed, 13 Sep 2006 08:12:48 -0400 Subject: [Pljava-dev] Updating an array In-Reply-To: <6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com> References: <6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com> Message-ID: <4507F5C0.2050504@tada.se> Hi Bendik, This looks like a deficiency in the PL/Java JDBC driver. Could you please enter it as a bug? Thanks, Thomas Hallgren Bendik Rognlien Johansen wrote: > Hello, I am trying to update an array of integers using a prepared > statement. > > Column "categories" in the table "records" is of type integer[] > > String updateSQL = "UPDATE records SET categories = ? WHERE id = ?;"; > PreparedStatement updateStatement = getConnection().prepareStatement > (updateSQL); > > int[] test = {11,22,33}; > > updateStatement.setObject(1, test); > updateStatement.setInt(2, 123); > updateStatement.execute(); > > > I get the following error: > ERROR: java.sql.SQLException: No such SQL type: 2003 > > I also tried Integer[]. Same problem. > > Is there any way to make this work? > > Thanks! > > _______________________________________________ > Pljava-dev mailing list > Pljava-dev at gborg.postgresql.org > http://gborg.postgresql.org/mailman/listinfo/pljava-dev >