Subject Foreign key problems
Author douglasht@ig.com.br
Hi there,

I'm having problems creating foreign keys in firebird 1.0.0.338 beta2
on an
NT4 SP5 Workstation box. Below is a small script that hopefully
reproduces
the behavior.

CREATE TABLE TEST1
( FIELD1 INTEGER NOT NULL);
commit;
CREATE UNIQUE INDEX PK_TEST1 ON TEST1(FIELD1);
commit;
CREATE TABLE TEST2
( FIELD2 INTEGER NOT NULL );
commit;
ALTER TABLE TEST2
ADD CONSTRAINT FK_TEST2
FOREIGN KEY(FIELD2) REFERENCES TEST1(FIELD1);

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


This happens in IBExpert as well as in IBConsole.

Thanks for your time and help,

dog