修改数据问题~~~~~~~~~~大家帮忙!!!!~~~~~
public static boolean MakeDate(String upname, String name, String sex,
String phone) {
String strSQL;
try {
strSQL = "Update telephone set Name = ' " + name + " ',Sex = ' " + sex +
" ',Phone= ' " + phone + " 'where Name = ' " + upname+ " ' ";
st.executeUpdate(strSQL);
javax.swing.JOptionPane.showMessageDialog(null, "更新成功! ", "提示 ",
javax.swing.JOptionPane.PLAIN_MESSAGE);
return true;
} catch (
SQLException ex) {
return false;
}
}
/////////////////////////////////////////////////
/**
*
* @------------------------------------------修改数据按钮事件
*/
public void jButtonMake_actionPerformed(ActionEvent e) {
String upname;
ResultSet rs;
String upp;
name = this.jtext_name.getText();
sex = this.jtext_sex.getText();
phone = this.jtext_phone.getText();
upname = jTextMakename.getText();
if (Database.MakeDate(upname, name, sex, phone)) {
System.out.println( "OKOK ");
} else {