Board index » delphi » Re: Problems with relation to Primary Key fields that are also foreign key

Re: Problems with relation to Primary Key fields that are also foreign key


2005-04-28 12:41:40 AM
delphi259
We cannot read minds. If you get an error message or messages we need
to know the exact text of each message before anyone can help you.
--
Bill Todd (TeamB)
 
 

Re: Problems with relation to Primary Key fields that are also foreign key

:)
well, sorry for the incomplete information, i guess i was a bit sleepy when
i post the message.
The error mesage:
'Unsuccesful metadata update
store RDB$ref_contraints failed
action cancelled by trigger (1) to preserve data integrity
Name of Referencial Contraint not defined in constraint table.'
Thanks a lot!
"Bill Todd" <XXXX@XXXXX.COM>escribi?en el mensaje
Quote
We cannot read minds. If you get an error message or messages we need
to know the exact text of each message before anyone can help you.

--
Bill Todd (TeamB)
 

Re: Problems with relation to Primary Key fields that are also foreign key

I guess I was not paying close attention when I read your message. I
suspect that your problem is that B.fk_c does not have a unique index.
A foreign key relationship must be one-to-many. It cannot be
many-to-many.
--
Bill Todd (TeamB)
 

Re: Problems with relation to Primary Key fields that are also foreign key

I checked the table, B.fk_c is a primary key and unique index.
"Bill Todd" <XXXX@XXXXX.COM>escribi?en el mensaje
Quote
I guess I was not paying close attention when I read your message. I
suspect that your problem is that B.fk_c does not have a unique index.
A foreign key relationship must be one-to-many. It cannot be
many-to-many.

--
Bill Todd (TeamB)
 

Re: Problems with relation to Primary Key fields that are also foreign key

Then B and C have a one-to-one relationship since they have the same
primary key. I have no idea what is causing the behavior you describe.
Sorry.
--
Bill Todd (TeamB)