Re: How to get batch commands to work

From: Kris Jurka <books(at)ejurka(dot)com>
To: Björn Bergenheim <bjornJmagic(at)kenetworks(dot)se>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: How to get batch commands to work
Date: 2006-02-27 22:14:30
Message-ID: Pine.BSO.4.63.0602271713090.283@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 27 Feb 2006, Bjrn Bergenheim wrote:

> Hello all, I have tried to check out the archive since this seems like a
> question I shouldnt be the first to ask, but I have come up with
> nothing. I'm doing a massive insert batch, and thought that you could
> add a few insert to a batch, and then execute the batch, and then
> continue adding more inserts, and then run the batch, and so on.
> However, when I try to do this, I get an exception when I try to
> populate my prepared statement after I have run the executeBatch() for
> the first time. The eception I get is "Parameter index out of range":
>

This should work fine as the attached test does for me. Can you show us a
complete example of something that fails?

Kris Jurka

Attachment Content-Type Size
BatchTest.java text/plain 770 bytes

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jonathan Vallar 2006-02-28 08:42:07 Bad Value for Data Type Timestamp
Previous Message Kris Jurka 2006-02-27 22:08:48 Re: postgres PreparedStatement commented ? problem PSQLException: