title: I am trying to insert data from a form using a servlet and bean file but when i try to insert the data i get - Driver does not support this function
body: <p>I am using Access and Prepared Statement, the code below is my insertData Method:</p>
  
  <pre><code>public static Bean insertData(String name, int age, String date, boolean hero, boolean villian) {
  ....
  sql = "insert into hv(name, age, firstApperance, hero, villian) values (?,?,?,?,?)";
  PreparedStatement ps = con.prepareStatement(sql);
  ps.setString(1, name);
  ps.setInt(2, age);
  ps.setString(3, date);
  ps.setBoolean(4, hero);
  ps.setBoolean(5, villian);          
  ps.executeUpdate (sql);         
  ......
  </code></pre>
  
  <p>the first couple of error lines are:</p>
  
  <pre><code>Driver does not support this function
  at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)
  at org.enterprise.Bean.insertData(Bean.java:59)
  at org.enterprise.InsertData.doPost(InsertData.java:49)
  </code></pre>
  
  <p>i am just confused as to what the problem is beacuse i have checked if their is data in the variables name, age, date, hero, villian; And their is they were requested in my servlet and forwarded to this bean.</p>
  
  <pre><code>String name = request.getParameter("nameIn");
  String ageInState = request.getParameter("ageIn");
  ....
  </code></pre>
  
  <p>and sent to bean class using:</p>
  
  <pre><code>bean = Bean.insertData(name, age, date, hero, villian);
  </code></pre>