Take out the quotes around damount: String updatebalance ="Update dsnuser set balance= balance+ "+damount+" from dsnuser where cardnumber='"+cardnumber+"' ";
-----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Miao, Franco CAWS:EX Sent: Monday, November 12, 2001 2:12 PM To: [EMAIL PROTECTED] Subject: pls help to check if it is syntax error here is the source code, for some reason, the balance just add up in string instead of amount, let's say original balance has $2000, after update $1000 its should has total $3000, but the the fact is $200010000, pls help me out thanks! Franco String updatebalance ="Update dsnuser set balance= balance+'"+damount+"' from dsnuser where cardnumber='"+cardnumber+"' "; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); if(updateCount > 0) =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
