Hi,
I don’t why the below error happens,
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘ip’ cannot be null
I wanted to add a new item, or row, for a Table.
Object itemId = hostConnector.addItem();
newItem = hostConnector.getItem(itemId);
And then, after input fields
newItem.getItemProperty(“name”).setValue(host.getName());
newItem.getItemProperty(“ip”).setValue(host.getIp());
System.out.println(newItem.getItemProperty(“name”).getValue() + " " + newItem.getItemProperty(“ip”).getValue());
hostConnector.commit();
That error happened.
This process is in a popup window. It is starnge things is that the first time when I call the popup, there are no errors. But then, I call the popup again, this error happens.
I don’t why and what I should do?
I’ll appreceiate any advice.
Thanks.