So this is just a snippet of my code:
Sql = "update budgetreport" +
" set sales="+salesText.getText()+
" where quarter="+ qTracker+
" set cogs="+cogsText.getText()+
" where quarter="+ qTracker;
try {
myStmt.executeUpdate(Sql);
} catch (Exception e1) {
e1.printStackTrace();
}
My problem is, it says there is an SQL syntax. I ran it with just the first part:
Sql = "update budgetreport" +
" set sales="+salesText.getText()+
" where quarter="+ qTracker;
try {
myStmt.executeUpdate(Sql);
} catch (Exception e1) {
e1.printStackTrace();
}
And it ran fine. But I do not under stand what to do in order to make my first snippet of code function. Thanks for taking your time to read/answer :)! ......
updatestatements: one forsalesand one forcogs.