agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Updating an array
Date: Wed, 13 Sep 2006 12:46:21 +0200
Message-ID: <6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com> (raw)
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!
view thread (4+ messages) latest in thread
Message-ID: <6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com>
Permalink: ../6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com/
Also on: postgresql.org/message-id/6EEAC261-29D8-4C92-852E-3B03A513352F@gmail.com
reply
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 using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Updating an array
In-Reply-To: <6EEAC261-29D8-4C92-852E-3B03A513352F@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox