executeBatch() issue with new driver?

From: Alan Stange <stange(at)rentec(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: executeBatch() issue with new driver?
Date: 2004-11-02 16:04:53
Message-ID: 4187B025.2090201@rentec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all,

I'm using pg8 beta 3, with the pgdev.307.jdbc3.jar JDBC driver.

If I run the following example code:

Connection conn = ...;
Statement st = conn.createStatement();
String sql = "create temp table t (a int4); insert into t (a) values (1);";
st.addBatch(sql);
st.executeBatch();

I get the following error:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at
org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2317)
at
org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleCommandStatus(AbstractJdbc2Statement.java:2293)
at
org.postgresql.core.v3.QueryExecutorImpl.interpretCommandStatus(QueryExecutorImpl.java:1230)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:968)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2371)
at com.rentec.fi.db.DbStatement.executeBatch(DbStatement.java:88)

Am I missing something here?

Thanks!

-- Alan

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2004-11-02 16:35:50 Re: executeBatch() issue with new driver?
Previous Message Sebastiaan van Erk 2004-11-02 15:08:49 Re: ps.setCharacterStream() and memory usage