0

hi ,

i want to add code to edit text feild (Jdatachooser ) in my code , how it ?
i have attribute ( Date ) type Date to mysql .
how to add below code ?

 try {
        String va_ID = txt_idParking.getText();
        String va_numCar = txt_numCar.getText();
        String va_Modelcar = txt_modelCar.getText();
        String va_KatyHatn = txt_katyHatn.getText();
        String va_KatyRoshtn = txt_katyRoshtn.getText();
        String va_Price = txt_price.getText();

        String sql = "update inputkaty set idParking='" + va_ID + "',numCar='" + va_numCar + "',ModelCar='" + va_Modelcar + "',katyHatn='" + va_KatyHatn + "',KatyRoshtn='" + va_KatyRoshtn + "',Price='" + va_Price + "'where idParking='" + va_ID + "' ";
        pst = conn.prepareStatement(sql);
        pst.execute();
        JOptionPane.showMessageDialog(null, "Are data Updated");
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    }
    tableData();
}
1
Contributor
1
Reply
12
Views
2 Years
Discussion Span
Last Post by Halkawt.Papula
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.