title: Insert value into database using jdbc
body: <p>I am using MS-Access and Java with connection of JDBC-ODBC driver. As the code below, I'm trying to create a registration textbox but when I add the values, I only get the result "null" in the database. How do I get the real value I'm inserting ? Thanks</p>
  
  <pre><code>    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  
      Connection con = DriverManager.getConnection("jdbc:odbc:ADB");
  
      Statement statement = con.createStatement();
  
      statement.executeUpdate("insert into Login " + "values  ('"+uname+"','"+pwd+"')"); 
  
      uname = userTextBox.getText();
      pwd = passTextBox.getText();
  </code></pre>