Subject RE: [firebird-support] Re: problem with insert or update
Author Sasha Matijasic
>
> Hello,
> I have done just an insert and i have the same problem (with an
> update it is good)
> SQL> insert into CODECOMPTA (code_compta) values('test');
> Statement failed, SQLCODE = -803
> violation of PRIMARY or UNIQUE KEY constraint "PK_CODECOMPTA" on
> table "CODECOMPTA"
> i have done a gbak -b and -c and it is the same thing
>
> Thank you for help
>

Is your CODECOMPTA table empty? What is the current value of the CODECOMPTA_GEN sequence?
Is it possible that the table is not empty, and current sequence value is less than max(id) so the primary key gets violated?

Sasha