Created attachment 60574 [details] Snapshots of the error generating process Sw: - LibreOffice 3.4.4 Portable (from portableapps.com) - WinXP 2002 SP3 1.- I mark a field in a table definition as "Automatic Value". 2.- I edit the table entering a new record and leaving the marked field blank. I expect LO Base to generate the next value for the field defined as "Automatic Value" and create a record with it. Sympthom: LO Base shows an error dialog: " Error inserting a new data record. Attempt to insert null into a non-nullable column: ID table: MO_Sitios in statement [INSERT INTO "MO_Sitios" ("URL") VALUES [?]] "
When looking in the tabele there is no auto-value. Could you reproduce this for more times and other versions? Robert
@reporter, exits the problem still in LO 3.6.0 (or 3.6.1 RC2)?
Did you change your field definition after having already put data in the table, some of which are NULLed ? If so, then the error message is the logical (at least for Base) response to that.
You don't tell us how the database file was created in the first place, i.e. how it was defined, whether or not it held data in it already, or whether the definition of your autovalue field is something of an afterthought that you implemented after initial creation of the table. Also note that 3.4.x was not the best branch in terms of Base behaviour, many bugs appeared in that branch and only some were resolved in 3.5.x. Please try a more recent, production version of LO. Alex
I've checked again: 1.- Creating a new table from scratch the problem doesn't appear again. 2.- The original table is empty and has the autovalue setting set to "No". I change it to "Yes" and close the table definition window. Then I open the table and try to enter a record filling the "URL" field. The "ID" field shows an "<AutoField>" tag. Leaving the record to enter a second record, LibreOffice says: Error inserting the new record: Integrity constraint violation - no parent SYS_FK_74 table: MO_URLs in statement [INSERT INTO "MO_Sitos" ( "URL") VALUES ( ?)] Clicking on the "more..." button an error list with 2 items is shown. The first says: "Error inserting the new record:" The second says: " SQL Status: 23000 Error code: -177 Integrity constraint violation - no parent SYS_FK_74 table: MO_URLs in statement [INSERT INTO "MO_Sitos" ( "URL") VALUES ( ?)] " Hope this helps.
(In reply to comment #3) > Did you change your field definition after having already put data in the > table, some of which are NULLed ? If so, then the error message is the > logical (at least for Base) response to that. I can't remember right now if it happened that way, but if it did, such records were already deleted and are not here as I reproduce the error again. The table is shown empty.
I can't confirm the described behavior under OpenSUSE Linux 32bit rpm - LO 3.3.4 and LO 3.4.4 tested. Created a table with primarykey without autovalue, punt some content in this table, then closed the database, opened again. Deleted the content of the table. Editing the properties of the primarykey to autovalue. Could write content in other fields. The rows were saved. The primarykey was automatic set in the right way. Could you please attach a database, which shows the behavior you reported?
I found what seems to be the root of the problem: a foreign key constrain. Under such circumstance the behaviour is perfectly correct. The error message could be improved though. :-m Thank everybody for your efforts. Sorry for anoying you without a good reason :(