*例外 : *
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement
コードは次のとおりです。
String Name = txtName.getText();`
String Email = txtEmail.getText();
String Mobile = txtMobile.getText();
String Address = txtAddress.getText();
String Dob = txtDob.getText();
試す {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection = DriverManager.getConnection("jdbc:odbc:NewPData");
String query = "update Table1 set Name='" + Name + "' , Email='" + Email + "' , Mobile=" + Mobile + ", Address= '" + Address
+ "', DOB=" +Dob + ", ここで ID=" + Update; PreparedStatement ps_Statement = connection.prepareStatement(クエリ); ps_Statement.executeUpdate(); JOptionPane.showMessageDialog(panelID, "レコードが正常に更新されました"); connection.close(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); }