title: Insert data in to oracle table using netbeans
body: <p>I want to insert data into my oracle table using netbeans text fields and there is a  problem with  this code. When this screen execute it gives me an exception:</p>
  
  <blockquote>
    <p>java.sql.SQLException:Invalid column index </p>
  </blockquote>
  
  <p>Please help me as soon as possible.</p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
  {
      conn = javadb.ConnectDb();
  
      try{
          String sql = "insert into addbook (id, title, isbn, author)"
                  + " values(null,'','','');";
          pst = (OraclePreparedStatement) conn.prepareStatement(sql);
          pst.setString(1, title.getText());
          pst.setString(2, isbn.getText());
          pst.setString(3, author.getText());
          rs = (OracleResultSet) pst.executeQuery();
  
      }catch(SQLException | HeadlessException e){
          JOptionPane.showMessageDialog(null, e);
      }
  }                                        
  </code></pre>