Hi all,
I am getting com.servoy.j2db.dataprocessing.DataException: ERROR: null value in column “jobkey” violates not-null constraint error while saving data by given code please help me.
forms[frmObject].foundset.newRecord();
databaseManager.saveData();
Hi dekumar2,
The error seems pretty clear to me.
You seem to have a column ‘jobkey’ in the table attached to the formname set in frmObject.
This column does not allow ‘null’ values (defined in the DB).
While creating a new record, the value of this column is probably null.
So when saving the data, the DB will return an error to Servoy, explaining the column can’t have this null value.
In case this ‘jobkey’ column is your primary key, you should find out why the primary key is not generated.
By default Servoy is generating the key (servoy sequence), but you could choose to have this DB-managed or have Servoy generate a UUID.
I can’t provide a straighforward solution/answer for that.
Hope this helps.
It looks like you are attempting to write a null value to column ‘jobkey’ which has been set to not allow null values. Check the table definition for this column. If ‘jobkey’ is the primary key for this table, it must not contain null values.
I hope this helps!