File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes executeUpdate method is returning zero. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "executeUpdate method is returning zero." Watch "executeUpdate method is returning zero." New topic

executeUpdate method is returning zero.

vedha vas

Joined: Jul 22, 2008
Posts: 10
The executeUpdate() Method is returning zero for a update query.
Which when we execute it oracle works fine and updated the data.
The parameters set in the query are all correct.
Can anyone please help me? why the executeUpdate() returns zero?

Regrads,<br />Vedha.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

What's the query you are running? There are cases, such as creating a table, where executeUpdate returns 0.

[OCA 8 Book] [Blog]
vedha vas

Joined: Jul 22, 2008
Posts: 10
Am running a Update query.
dynamically am setting the parameters ( columns) and its values in the prepared statement.

Finally when am giving a executeUpdate its returning zero and when i run the same query in the oracle its updating the datas.
Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234
post your query please
It is sorta covered in the JavaRanch Style Guide.
subject: executeUpdate method is returning zero.
It's not a secret anymore!