Page 1 of 1

AUTOINCREMENT doesn't work

Posted: Wed 08 Oct 2014 10:52
by Schlueter
Hi,

I've updated to Version 2.4.11 from 2.3.9 and now the AUTOINCREMENT on fields doesn't work any more.

There is a table with a primary key of type INTEGER. If I didn't filled the key-field on INSERT, it was automatically set by an AUTOINCREMENT value. But now with new version on POST I get an error message that the field must have a value.

I should mention that I'm using a TClientDataset for the INSERT which is linked to the TLiteQuery by a TDataSetProvider.

Best regards
Rolf

Re: AUTOINCREMENT doesn't work

Posted: Thu 09 Oct 2014 09:38
by AlexP
Hello,

This error is due to that the NOT NULL attribute is set in the DDL definition of your auto-incremental field. In the new version, we process this attribute correctly and set the Required property to True for such fields. To solve the problem, you should remove the NOT NULL attribute from the DDL (this attribute is not need for auto-incremental fields), or set the UniQuery1.Options.RequiredFields property to false.