I'm struggling with similar issue as yesterdays, I can't seem to find any decent info on how to build sql statements using java and it's variables. Any suggestions would be great. Here's my code ....
Expand|Select|Wrap|Line Numbers
- String strSQL = "UPDATE customers SET customerName='" +name + "', customerAddress='" +address + "', customerEmail = '" +email + "', customerNumber = '" +phone + "', customerPurchase = '" +purchase + "' WHERE id='" +number + "';
- s.executeUpdate(strSQL);
I'm just getting a unclosed String literal but I know this won't be the correct way to do it anyway - it was just a guess.
Any one know how to do it?