This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Delete succeed but return 0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Delete succeed but return 0" Watch "Delete succeed but return 0" New topic
Author

Delete succeed but return 0

Susilo Saja
Ranch Hand

Joined: May 27, 2003
Posts: 91
Hi,
I called PreparedStatement.executeUpdate, passed in a delete statement which delete one row. It succeed, but it return 0. I've checked the database and it's really deleted. This delete statement is just a very simple sql statement that use one where condition.
Then I try to change the statement to delete something in other table, still the same database, in that same code, and it return the correct row count.
What is the possibility of this problem?
 
jQuery in Action, 2nd edition
 
subject: Delete succeed but return 0
 
Similar Threads
maintaining session
SQL Insert and Delete at same time?
SQL statement to Delete a row
JList selection to int not working
SQL statment to Delete a row