I am trying to create a java application that insert data in a database. Application is fairly simple. It take 3 input from user and insert that input to database. Everything working but I get sql error executing insert statement. Here is code snippet.
sa.executeUpdate("INSERT INTO history (to, subject, body)"+"VALUES("+ DATA1 + "','" + DATA2 + "','" +DATA3+ "')'");
I am sure I am having problem with the Double Quotes and Single Quotes in statement.