Subject | Foreign key problem |
---|---|
Author | acegracely |
Post date | 2005-03-22T13:36:38Z |
Hi,
I have a table called mastuser which has a primary key set to be
ACCOUNT and USER_NAME.
I have a child table called basket which includes those same two
fields (with a normal non unique index), but the primary key is on an
autoincrement field called ID.
I set up a foreign key based on ACCOUNT and USER_NAME for mastuser and
ACCOUNT and USER_NAME on basket even though it defaults to ID. When I
try and save the alterations I get the following error:
This operation is not defined for system tables.
unsuccessful metadata update.
could not find UNIQUE INDEX with specified columns.
Is this saying that I need a unique index on the basket table
consisting of ACCOUNT + USER_NAME?
I cannot do this because there may be multiple records in the basket
table. There will however only be one in the mastuser table.
Any ideas?
I am altering the schema using IBExpert.
Regards
Mike
I have a table called mastuser which has a primary key set to be
ACCOUNT and USER_NAME.
I have a child table called basket which includes those same two
fields (with a normal non unique index), but the primary key is on an
autoincrement field called ID.
I set up a foreign key based on ACCOUNT and USER_NAME for mastuser and
ACCOUNT and USER_NAME on basket even though it defaults to ID. When I
try and save the alterations I get the following error:
This operation is not defined for system tables.
unsuccessful metadata update.
could not find UNIQUE INDEX with specified columns.
Is this saying that I need a unique index on the basket table
consisting of ACCOUNT + USER_NAME?
I cannot do this because there may be multiple records in the basket
table. There will however only be one in the mastuser table.
Any ideas?
I am altering the schema using IBExpert.
Regards
Mike