Need help on "Record/Key deleted" 
Author Message
 Need help on "Record/Key deleted"

I currently work with D1/Interbase. The problem nevertheless is common for
D1, D2 and D3. Just created a new database with a few tables in it. Have a
butchers at one of the tables and its indices.

create table COUNTRY
(
    COUNTRYNO                       INTEGER                not null,
    COUNTRYNAME                     CHAR(15)               not null,
    PREFIX                          CHAR(10)               not null,
    CONTINENT                       CHAR(2)               default 'Eu' not null
        constraint ck_country_continent check (CONTINENT in ('Eu','As','Af','Oc','NA','SA','An')),
    constraint pk_country primary key (COUNTRYNO)
);

create unique ASC index COUNTRYNAMEX on COUNTRY (COUNTRYNAME);
create ASC index PREFIXX on COUNTRY (PREFIX);
create unique index COUNTRYNOX on COUNTRY (COUNTRYNO);

SET_COUNTRYNO trigger takes care of the primary key.

In my application I use StartTransaction, Commit and Rollback methods with
SQLPASSTHRU mode of the alias set to NOT SHARED. StartTransaction method is
triggered in OnShow event of the form and after each Commit and RollBack
in OnAfterCancel and OnAfterPost respectively.

Editing and deleting work just fine but when it comes to inserting a record
inevitably the above error msg appeares followed by "Key violation. Attempt
to store duplicate value in unique index COUNTRYNAMEX."

First I thought that the programme tries to insert a record twice. Then
I dropped both constraints and the indices leaving only primary key -
everything got back to normal.

I wander whats wrong with my table. ANy info on "Key deleted" message would
be greatly appreciated. Where can I find a description of such errors.

Many thanks,

Svyatoslav "Stan" Danilov



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Q2: Need help on "Record/Key deleted" message.

2. EDBEngineError..."Record/Key deleted"

3. TTable - "Record/Key deleted"

4. "Record/Key deleted"

5. "Record/Key Deleted" BDE Error

6. Interbase error "record/Key deleted"

7. "Record/Key Deleted" BDE Error

8. "Record/Key Deleted" Error

9. The keys "-"/"+"/"*"

10. HELP -- "Key group is locked" error

11. GOTO Command In Pascal "Need Help"

12. Need help with "Real"

 

 
Powered by phpBB® Forum Software