Reason:
PRIMARY KEY of the table is not set to AUTO-INCREMENT
This error can indicate that the table’s PRIMARY KEY is not set to AUTO-INCREMENT, (and your insert query did not specify an ID value).
Solution:
- Check that there is a PRIMARY KEY set on the table
- Set the PRIMARY KEY to AUTO-INCREMENT