public boolean changePassword(String username,String newpassword){ //用户修改密码
jdbcConnection();
System.out.println(username);
ResultSet rs=null;
try{
String newpass="update zhuce set password='"+newpassword+"' where username='"+username+"'";
rs=st.executeQuery(newpass);
while(rs.next()){
return true;
}
}catch(Exception e){
e.printStackTrace();
e.getMessage();
}
return false;
}
程序一运行,就报Can not issue data manipulation statements with executeQuery()错误。。是怎么回事呢。。
请朋友帮帮助
jdbcConnection();
System.out.println(username);
ResultSet rs=null;
try{
String newpass="update zhuce set password='"+newpassword+"' where username='"+username+"'";
rs=st.executeQuery(newpass);
while(rs.next()){
return true;
}
}catch(Exception e){
e.printStackTrace();
e.getMessage();
}
return false;
}
程序一运行,就报Can not issue data manipulation statements with executeQuery()错误。。是怎么回事呢。。
请朋友帮帮助
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货