即使在使用executeUpdate()面临同样的问题后,我也得到“查询不返回ResultSet”。我使用过SQlite.i已在此处添加了我的代码
try{
String str = userid.getText();
char[] str1 = userpass.getPassword();
String str2 = Arrays.toString(str1);
Connection con;
con = DriverManager.getConnection("jdbc:sqlite:C:/Users/Ajay/AppData/Local/Temp/Rar$EXa0.794/SQLiteStudio/Login");
Statement stmt;
stmt = con.createStatement();
Class.forName("org.sqlite.JDBC");
String strng = "insert into login(user,password) values('"+str+"','"+str2+"')";
stmt.executeUpdate(strng);
con.commit();
stmt.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(this,e);
}