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 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "A Servlet executeUpdate question" Watch "A Servlet executeUpdate question" New topic
Author

A Servlet executeUpdate question

Ryan Yeap
Greenhorn

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
Greenhorn

Joined: Apr 28, 2001
Posts: 28
OH!
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
 
Similar Threads
another newbie needs help...:-(
parseInt( )
parameter passing (very beginner)
delete tag
Struts2 2.1.8 form validation and setter type mismatch