unsa sayup ani ako code?di lagi sya mo edit!!humana ko sa add ug delete..edit nlng gyud kuwang!!
edit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae){
Connection con = null;
String value1,value2,value3,value4,value5,value6,value7,v alue8;
value1 = searchM1.getText();
value2 = RegisterLN1.getText();
value3 = RegisterFN1.getText();
value4 = RegisterMN1.getText();
value5 = RegisterAGE1.getText();
value6 = RegisterGENDER1.getText();
value7 = RegisterADDRESS1.getText();
value8 = RegisterNUMBER1.getText();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:vid");
Statement sti = con.createStatement();
sti.executeUpdate("UPDATE Membership_Record SET MemberLastName = '"+value2+"', MemberFirstName = '"+value3+"', MemberMiddleName = '"+value4+"', Age = '"+value5+"', Gender = '"+value6+"', Address = '"+value7+"', ContactNumber = '"+value8+"' WHERE MemberID = '"+value1+"'");
JOptionPane.showMessageDialog(null,"Updated successfully");
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(null,"Error in updating edit fields");
}
}
});
plss help mga bro