Java - Tengo un error java.lang.NullPointerException

 
Vista:

Tengo un error java.lang.NullPointerException

Publicado por Osvaldo (1 intervención) el 06/08/2014 19:32:09
Hola buenas tardes a todos espero me puedan ayudar tengo un error java.lang.NullPointerException y no se porque intento modificar la base de datos mediante una frame en netbeans con un procedimiento almacenado mi codigo es el siguiente

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
private void btnmodificarActionPerformed(java.awt.event.ActionEvent evt) {
        String numemple=this.txtnumemple.getText();
        String nom=this.txtnom.getText();
        String dom=this.txtdom.getText();
        String curp=this.txtcurp.getText();
        String rfc=this.txtrfc.getText();
        String nss=this.txtnss.getText();
        String termi=this.cmdTerminal.getSelectedItem().toString();
        String sueldo=this.txtsuel.getText();
 
        try {
            cst=con.prepareCall("[call modificar(?,?,?,?,?,?,?,?)]");
            cst.setString(1,numemple);
            cst.setString(2, nom);
            cst.setString(3, dom);
            cst.setString(4,curp);
            cst.setString(5,rfc);
            cst.setString(6,nss);
            cst.setString(7,termi);
            cst.setString(8,sueldo);
            int rpta=cst.executeUpdate();
            if(rpta==1){
                JOptionPane.showMessageDialog(this,"Empleado Modificado","Aviso",JOptionPane.INFORMATION_MESSAGE);
           this.txtnumemple.setText("");
           this.txtnom.setText("");
           this.txtdom.setText("");
           this.txtcurp.setText("");
           this.txtnss.setText("");
           this.txtrfc.setText("");
           this.txtsuel.setText("");
           this.cmdTerminal.setSelectedIndex(0);
 
            }else{
 
                JOptionPane.showMessageDialog(this,"Eror al Modificado","Aviso",JOptionPane.INFORMATION_MESSAGE);
 
            }
 
 
        } catch (Exception e) {
                JOptionPane.showMessageDialog(this, e.toString());
        }
    }


espero alguien me pueda ayudar ;)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder