Base | Firebird primary key/autovalue/BigInt field collides with SQL

From the error message of Calc BASIC:

It looks like SQL tried to insert new record with ID=1 but Firebird didn’t allow for ID=1 exists.

Did I misunderstand or how can I handle ?

0004.ods

firebird4ask.odb

Hello,

The problem is with the auto-increment starting point. As it is not known how you got the initial data into the table, it is probable it was imported in some way. This then did not set the value correctly. See this post → After updating I get error message when saving in Base.

You can correct the problem by running the following statement from Tools->SQL...:

alter table "AccountCodeLevel1" alter "ID" restart with 5;

Dear @Ratslinger,

Yes, I created the table by copying from Calc and pasting in Base/Firebird.

Khob Khun Krab.

Dear @Ratslinger,

Does this kind of problem happen with HSQLDB database or others ?

Just Firebird embedded. See tdf#119962

Dear @Ratslinger,

Thank you so much again.