File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

prepared statement in batch always returning an array of -2

 
G Ranjith
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
stu derby
Ranch Hand
Posts: 333
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic