title: Java - How can I INSERT values in SQLite?
body: <p>Im starting in SQLite, I created my db and the connection works.
  When I try to Insert a value (the db is empty) I get the following error:</p>
  
  <blockquote>
    <p>java.sql.SQLException: near ".684": syntax error</p>
  </blockquote>
  
  <pre><code>import java.sql.*;
  
  public class connection{
      String route = "C:\\Freeman SA.db";
      Connection c = null;
      Statement stat = null;
      String op;
  
      public void connect(){
          try{
              c = DriverManager.getConnection("jdbc:sqlite:"+route);
              if (c!=null)
                  System.out.println("Connected to db.");
          }
          catch (SQLException ex) {
              System.err.println("Couldn't connect."+ex.getMessage());
          }
      }
  
      public void insert_DB(String NAME, String LNAME, String ID, int AGE, int TIME, int SALARY) throws SQLException{
          connect();
          try {
              stat = c.createStatement();
              op = "INSERT INTO Remuneraciones (Nombre, Apellido, Rut, Edad, Tiempo, Sueldo) VALUES (" + NAME + ", " + LNAME + ", " + ID + ", " + AGE + ", " + TIME + ", " + SALARY + ");";
              stat.executeUpdate(op);       //Here is the problem
              stat.close();
          }
          catch (SQLException e) {
              System.err.println(e.getClass().getName() + ": " + e.getMessage());
          }
          c.close();
      }
  }
  </code></pre>
  
  <p>Main.</p>
  
  <pre><code>public static void main(String[] args) throws IOException {
  
          connection n = new connection();
          try {
              n.insert_DB("Charlie", "White", "18.954.621-K", 21, 2, 650000);
          } catch (SQLException ex) {
              Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  </code></pre>
  
  <p>PD: I'm learning from here: <a href="http://www.tutorialspoint.com/sqlite/sqlite_java.htm" rel="nofollow">http://www.tutorialspoint.com/sqlite/sqlite_java.htm</a></p>