I would like to save the image, (NOT the template) of a fingerprint image, the code to convert it according to the DigitalPersona manual is this:
public Image CrearImagenHuella(DPFPSample sample)
{
return
DPFPGlobal.getSampleConversionFactory().createImage(sample);
}
And the code I use to save Mysql is this:
try
{
Connection c=cn.conectar();
PreparedStatement guardarStmt = c.prepareStatement("INSERT INTO somhue(hnombre,identificacion, huehuella) values(?,?,?)");
guardarStmt.setString(1,nombre);
guardarStmt.setInt(2, Id);
guardarStmt.setBinaryStream(3,in);
//Ejecuta la sentencia
guardarStmt.execute();
guardarStmt.close();
JOptionPane.showMessageDialog(null,"Huella Guardada Correctamente");
cn.desconectar();
BtnGuardar.setEnabled(false);
}
catch (SQLException ex)
{
//Si ocurre un error lo indica en la consola
System.err.println("Error al guardar los datos de la huella.");
JOptionPane.showMessageDialog(null, "La persona ya se encuentra registrada por favor verificar los datos e intentar de nuevo ","VERIFICACION DE DATOS", JOptionPane.ERROR_MESSAGE);
}
finally
{
cn.desconectar();
}
However I could not use that variable "sample" inside the code to save in mysql, someone who can tell me how to store it?