Error al dar un alta en un ABM
Publicado por Mateo (4 intervenciones) el 05/11/2019 20:43:39
Buenas gente, alguien me podría explicar este error que se muestra.
muchas gracias.

este es el codigo del metodo:
muchas gracias.
este es el codigo del metodo:
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
public void Alta()
{
try
{
Instruccion = Con.Conectado().prepareStatement("INSERT INTO medicos (NroMat, Ape, Nom, Dni, Tel, Sexo, Especialidad_idEspecialidad ) VALUES (?,?,?,?,?,?,?);");
Instruccion.setString (1,this.getNroMat());
Instruccion.setString (2,this.getApe());
Instruccion.setString (3,this.getNom());
Instruccion.setString (4,this.getDni());
Instruccion.setString (5,this.getTel());
Instruccion.setString (6,String.valueOf(this.getSexo()));
Instruccion.setString (7,this.getIdEspecialidad());
int Registro = Instruccion.executeUpdate();
if (Registro>0)
{
JOptionPane.showMessageDialog(null, "Registro guardado");
}
}
catch(SQLException e)
{
JOptionPane.showMessageDialog(null,"No se ingreso el alta de medicos\n"+e);
}
}
Valora esta pregunta


0