This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes stmt.getUpdateCount Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "stmt.getUpdateCount" Watch "stmt.getUpdateCount" New topic


kelly benson

Joined: Nov 28, 2004
Posts: 3
what does this method do if i fire a select query that returns 0 records.
what does it do in general.
G Raghavan

Joined: Aug 21, 2000
Posts: 15
This method returns the number of rows affected, when an insert or update query i executed.

If you have executed a select query which will return a resultset it will return -1.

G Raghavan
I agree. Here's the link:
subject: stmt.getUpdateCount
It's not a secret anymore!