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();
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.