jQuery in Action, 3rd edition
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
ProcessOrder.java:437: 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="http://www.mmorpgforums.com" 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: http://aspose.com/file-tools
subject: A Servlet executeUpdate question
It's not a secret anymore!