Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a table

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Unsuccessful metadata update
STORE RDB$REF_CONSTRAINTS failed
action cancelled by trigger (1) to preserve data integrity
Name of Referential Constraint not defined in constraints table

What does this mean?
 
Let me guess:
looks like you try to pass data which didn't pass the validation checks. Looks like you tried to enter data in a column which has a look-up constraint in another table. Update the look-up table first.


S. van Els
SAvanEls@cq-link.sr
 
I am a newbee with IB 6. Its the open source version and have come across a
problem.

When I try to execute the script below I get an error, and have not managed
to get passed it for the past couple of days.

this is the SQL error:
Unsuccessful metadata update
STORE RDB$REF_CONSTRAINTS failed
action cancelled by trigger (1) to preserve data integrity
Name of Referential Constraint not defined in constraints table
Statement: ALTER TABLE APPLICATION
ADD FOREIGN KEY (FK_GroupsID)
REFERENCES GROUPS

this is the SQL script:
CREATE TABLE APPLICATION (
PK_ApplicationID INTEGER NOT NULL,
FK_AmendByPersonID INTEGER DEFAULT 0,
FK_GroupsID INTEGER DEFAULT NULL,
Name VARCHAR(50),
EXEName VARCHAR(50),
Description VARCHAR(18),
AmendDateTime DATE,
CreateDateTime DATE,
OrderNo INTEGER DEFAULT 0,
VersionNo VARCHAR(20)
);

CREATE UNIQUE INDEX idxPrimaryKey_Application ON APPLICATION
(
PK_ApplicationID
);

ALTER TABLE APPLICATION
ADD PRIMARY KEY (PK_ApplicationID);

CREATE TABLE GROUPS (
PK_GroupsID INTEGER NOT NULL,
FK_AmendByPersonID INTEGER DEFAULT 0,
Name VARCHAR(50) NOT NULL,
Description VARCHAR(255),
Options VARCHAR(50),
AmendDateTime DATE,
CreateDateTime DATE
);

CREATE UNIQUE INDEX idxPrimaryKey_Groups ON GROUPS
(
PK_GroupsID
);

ALTER TABLE GROUPS
ADD PRIMARY KEY (PK_GroupsID);


ALTER TABLE APPLICATION
ADD FOREIGN KEY (FK_GroupsID)
REFERENCES GROUPS;

ALTER TABLE GROUP_PERSON
ADD FOREIGN KEY (FK_GroupsID)
REFERENCES GROUPS;



this code was generated by ERwin 4.0. can anyone help?
many thanks,
Quinton.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top