SEVERE: null
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc .java:6956) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java :7113) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java :3109) at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcSt atement.java:337) at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Jdbc OdbcStatement.java:287)
public Student_Registration() { super(""); initComponents(); try { //DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver()); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:student"); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Check connectivity with database", "Error", 3); }}//Insert data to Db

String insertinfo = "insert into student_info(name,dob,address,ten,twelve,sex,mail, mobile) values('" + txt_name.getText().toString() + "', '" + txt_dob.getText().toString() + "', '" + txt_add.getText().toString() + "', '" + txt_10.getText().toString() + "','" + txt_12.getText().toString() + "','" + cb_sex.getSelectedItem().toString() + "','" + txt_mail.getText().toString() + "','" + txt_mobile.getText().toString() + "')"; try { Statement ist = con.createStatement(); ist.executeUpdate(insertinfo); } catch (SQLException ex) { Logger.getLogger(Student_Registration.class.getNam e()).log(Level.SEVERE, null, ex); System.out.printf("" + insertinfo); }

Check Solution