Forums Register Login

prepared statement in batch always returning an array of -2

+Pie Number of slices to send: Send
Hi,

Im using prepared statement. The statement is prepared outside the loop.
Inside the loop, datas are varied and added to batch.
On executing the batch , it returns an integer array.
The problem is , the values in the array are always -2 independent of whether the status is true or false.
Im always getting an array of -2(array length is equal to loop) even though sometimes database is upadated and sometimes not updated.

Any help in this regard is welcome.

Thanks in advance...
+Pie Number of slices to send: Send
What you get depends on which database driver you're using. I'm guessing you're using the Oracle driver, 'cause that's what yo get from it:
http://www.stanford.edu/dept/itss/docs/oracle/9i/java.920/a96654/oraperf.htm#1057093
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
Importing large number of rows
Pass 6 elements of arraylist to prepared stmt
Search query is taking too long to search
Why does a JDBC batch update return a -2
MySQL memory leak
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:46:56.