please is it possible for me to insert into ms access using netbeans gui? I have tried it but it's nt working. see my code below:




private void cmdsaveMouseClicked(java.awt.event.MouseEvent evt) {


String sql="INSERT INTO Table2("
+"username,"
+"password)"+ "VALUES('"+txtuname.getText()+"','"+txtpsword.getT ext()+"')";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbcdbc:boy");
Statement ps=con.createStatement();
con.setAutoCommit(false);
int i=ps.executeUpdate(sql);
con.commit();

JOptionPane.showMessageDialog(null, "Saved");
con.close();
}catch(SQLException|ClassNotFoundException ex){
JOptionPane.showMessageDialog(null,"Error>>"+ex.ge tMessage() );
}

}

see the error that it gives me

[MICROSOFT][ODBC MICROSOFT ODBC ACCESS DRIVER] Operation must use an updatable query