Hello!
I’m new to DB administration and keep running into an issue with ‘(AutoFields)’ not working. Here is the exact error:
[MySQL][ODBC 8.0(a) Driver][mysqld-8.0.21]Field ‘ProductIDN’ doesn’t have a default value
Image of error
I am running MySQL 8.0.21 on a host W10 machine. On my client machine, I’m running LibreOffice Base 7.0.1.2 (x64). I am using the ODBC connector/driver and can connect to DB seemingly fine to make and edit tables.
I’m getting an issue where after inputting a few records in a table and then coming back to the table, the ‘ProductIDN’ field that I’m using as a primary key is not auto incrementing anymore. I created a new table and it seems to be working but I am worried it will just stop working unless I know what is going on.
In MySQL workbench I have confirmed that the primary key columns in the working table and the non-working table are tagged as ‘int AI PK’.
Also, possibly related, I am getting the following error when I try to copy a table with a working AutoField:
SQL Status: 42000
Error code: 1064
[MySQL][ODBC 8.0(a) Driver][mysqld-8.0.21]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.products_22
(ProductIDN
integer NOT NULL auto_increment,Name
varchar(128’ at line 1
Image of error when copying the table
Thoughts?
Thanks for you time!