Avatar of j18
j18 asked on

I can't create a primary key in Interbase 6.5

Hi there!

As a part of small update on my database. I tried to create a primary key on the table called Transact. This table contains the entity called 'CODE'. I am using gerator ( defined in the database as TRANSACT_CODE_GEN) to supply the value.  There is no chance of duplicate values for entity CODE.

There was one primary key on this table and index related to this primary key as under:

Despite of making sure that, there is no duplicate value in CODE,no similar primary key, I keep getting this error message while creating a new primary key.
"Attempt to store duplicate value (visible to active transactions) in unique index "RDB$PRIMARY79"
Statement: alter table transact add CONSTRAINT PK_TRANSACT_CODE PRIMARY KEY (CODE)"

I have tried converting the database in the latest version of Interbase 2007 and 7.5 and this error doesn't come up in the latest version.

Would any one please assist me to either rectify this or tell me, If there is any issue with Interbase 6.5?

Avatar of undefined
Last Comment

8/22/2022 - Mon
Nick Upson

you are trying to add a primary key with a name that already exists, drop the existing primary key on the table, make sure the name you want to create is not used by some other table, then create the new primary key

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.