It does not let me change the default value of a field in the database that I have to use to do a job even if it is root, and above it gives me an error that a field has no default value, what do I do?
num_emp1.setText("" + rs.getDouble("num_emp"));
GuardaEmp = Double.parseDouble(num_emp1.getText());
private void AceptarActionPerformed(java.awt.event.ActionEvent evt) {
try
{
sqlDate = new java.sql.Date(utilDate.getTime());
tablaEmp.insertar(sqlDate, GuardaJefe,
nombre1.getText(),GuardaDpto,GuardaEmp,
GuardaSalario,tarea1.getText());
}
catch(Exception e)
{
e.printStackTrace();
}
}
When I finally added a default value I get the error of:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
and if I try to delete it from java I get this one:
Can not issue data manipulation statements with executeQuery ().
I do not know what to do.