This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes A Servlet executeUpdate question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "A Servlet executeUpdate question" Watch "A Servlet executeUpdate question" New topic

A Servlet executeUpdate question

Ryan Yeap

Joined: Apr 28, 2001
Posts: 28
Hi there,
this error has been bugging me for quite a while!
This is the error i get
-------------------------------------------------------------- incompatible types
found : int
required: java.sql.ResultSet
rsUpdateProducts = stmtUpdateProducts.executeUpdate("UPDATE s99661251_Products SET qty = qty-" + amount + " WHERE id = '" + productID + "'");
I was wondering what was wrong with my executeUpdate statement.... found int?

<A HREF="" TARGET=_blank rel="nofollow">An Online community for Online RPGs!</A>
Ryan Yeap

Joined: Apr 28, 2001
Posts: 28
Right after I posted here. I went back to look at the code and found the solution!
Thanks javaranch and community!
There must be a powerful java aura about here
I agree. Here's the link:
subject: A Servlet executeUpdate question
It's not a secret anymore!