Subject | RE: [firebird-support] Re: problem with insert or update |
---|---|
Author | Sasha Matijasic |
Post date | 2008-08-13T15:34:04Z |
>Is your CODECOMPTA table empty? What is the current value of the CODECOMPTA_GEN sequence?
> 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 it possible that the table is not empty, and current sequence value is less than max(id) so the primary key gets violated?
Sasha