Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number of rows affected by sql:update

 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


var = updatereserved variable is store the count of affected rows.
 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

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

Sean
 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh...yeah..I
I was thinking it returned an object like how a query does..will try it thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic