I am developing java application in netbeans. I connected database sqlite and it works perfectly. Now, i am trying to delete a field in database:
public void delete(){
dbo.openConnection();
String sqlCommand = "DELETE FROM restaurante WHERE id_restaurante = " + this.id_restaurante;
System.out.println(sqlCommand);
dbo.executeSQL(sqlCommand);
dbo.closeConnection();
}
When i execute this method, i get this error:
DELETE FROM restaurante WHERE id_restaurante = 4
ERRO null
...and the field doesn't delete in database.
If i copy this line: DELETE FROM restaurante WHERE id_restaurante = 4
and try delete in sqlite manager (add-on firefox), works perfectly.
Any ideas?