This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Number of rows affected by sql:update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Number of rows affected by sql:update" Watch "Number of rows affected by sql:update" New topic
Author

Number of rows affected by sql:update

Eman Adenola
Greenhorn

Joined: Apr 03, 2011
Posts: 27
Hi,
I am trying to get the number of rows affected by an <sql:update> but it returns an exception
I have the following code

Except it returns an exception saying

Any ideas? Thanks
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321



var = updatereserved variable is store the count of affected rows.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Eman Adenola
Greenhorn

Joined: Apr 03, 2011
Posts: 27
Hi, yeah but the problem is when i do
updatereserved.rowCount i get an exception, are you suggesting I use the updatereserved variable directly?
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

As the error says:
The object is an integer, so therefore it doesn't have a method called getRowCount().

Sean


I love this place!
Eman Adenola
Greenhorn

Joined: Apr 03, 2011
Posts: 27
oh...yeah..I
I was thinking it returned an object like how a query does..will try it thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Number of rows affected by sql:update
 
Similar Threads
Redirct page in Tilse with JSTL
jdbc connection in jsp
JSP DataBase Connection
JSP + JSTL + SQL
Problem of insert data into database