Re: BatchUpdate exception

From: Kris Jurka <books(at)ejurka(dot)com>
To: "Kranti K K Parisa \[GetSet-India\]" <kranti(dot)parisa(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: BatchUpdate exception
Date: 2007-12-06 09:39:03
Message-ID: Pine.BSO.4.64.0712060437550.6688@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 6 Dec 2007, Kranti K K Parisa [GetSet-India] wrote:

> for (int i=0;i<200;i++){
> //System.out.println("inside outer==>>"+i);
> for(int j=0;j<4;j++){
> proc=null;
> //System.out.println("inside inner==>>"+j);
> proc=con.prepareCall("{call
> client255271111.test_function()}");
> //proc.registerOutParameter(1, Types.INTEGER);
> proc.addBatch();
> }
> }
> int []intUpdates=proc.executeBatch();

Since you're reinitializing proc inside the loop you only end up adding
one batch to it, so you only get one batch out.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kranti K K Parisa [GetSet-India] 2007-12-06 09:42:22 Re: BatchUpdate exception
Previous Message Luca Ferrari 2007-12-06 08:16:43 java.io.EOFException