
Hi experts,
I tested my code and NetBean IDE gave me the following message:-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where ID = 2' at line 1 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
And here's my UPDATE Statement:
String sql = "UPDATE members SET strNRICNO=' " + NRIC
+ " ', strName=' " + Name + " ', strEmail= ' "
+ Email + " ', strAddress = ' " + Address + " ',strContact= ' "
+ Contact + "', strGender = ' " + Gender + "', strRemark = '"
+ Remark + "', strAge= '" + Age + "', strQualification= '"
+ Qualification + "',
+ strOccupation ='"
+ Occupation + "', strSubject= '"
+ Subject + "', strBudget ='"
+ Budget + "', where ID = " + selectionId;
stmt.executeUpdate(sql);
Please advise how should I change my SQL to use Heidi MySQL.
Tks.

Here is correct format:
String sql = "UPDATE members SET strNRICNO=' " + NRIC + " ', strName=' " + Name + " ', strEmail= ' " + Email + " ', strAddress = ' " + Address + " ',strContact= ' " + Contact + "', strGender = ' " + Gender + "', strRemark = '" + Remark + "', strAge= '" + Age + "', strQualification= '" + Qualification + "', + strOccupation ='" + Occupation + "', strSubject= '" + Subject + "', strBudget ='" + Budget + "', where ID = " + selectionId+""; stmt.executeUpdate(sql);