Re: BatchUpdate exception - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: BatchUpdate exception
Date
Msg-id Pine.BSO.4.64.0712060437550.6688@leary.csoft.net
Whole thread Raw
In response to Re: BatchUpdate exception  ("Kranti K K Parisa [GetSet-India]" <kranti.parisa@gmail.com>)
Responses Re: BatchUpdate exception  ("Kranti K K Parisa [GetSet-India]" <kranti.parisa@gmail.com>)
List 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

pgsql-jdbc by date:

Previous
From: Luca Ferrari
Date:
Subject: java.io.EOFException
Next
From: "Kranti K K Parisa [GetSet-India]"
Date:
Subject: Re: BatchUpdate exception