B
Bagger
Let me explain my situation and tables real quick and then see if anyone can
suggest a better way to set this up.
tb_Contract has Primary Key fields: Base_ID, Contract_Number
tb_DO has Primary key fields: Base_ID, Contract_Number, DO_Number
tb_Mod has Primary key fields: Base_ID, Contract_Number, DO_Number, Mod_Number
tb_Funding_Area has primary key fields: Base_ID, Contract_Number, DO_Number,
Funding_Area
tb_Mod_Detail has primary key fields: Base_ID, Contract_Number, DO_Number,
Mod_Number, Funding_Area, Project_Number
Now, the relationships between them are all based on the fields that they
share. So the hierarchy goes:
tb_Contract (1-many) tb_DO (Base_ID, Contract_Number)
tb_DO (1-many) tb_Mod (Base_ID, Contract_Number, DO_Number)
tb_DO (1-many) tb_Funding_Area (Base_ID, Contract_Number, DO_Number)
tb_Mod (1-many) tb_Mod_Detail (Base_ID, Contract_Number, DO_Number,
Mod_Number)
tb_Funding_Area (1-many) tb_Mod_Detail (Base_ID, Contract_Number, DO_Number,
Funding_Area)
Ok, given that (I hope it was understandable , let me add that all of the
relationships have cascading updates and deletes set. The problem I'm having
is that when I try to update a contract_number in tb_Contract, the cascading
update fails with the error message:
"-2147467259 : Cannot perform cascading operation. There must be a related
record in table 'tb_mod'."
However, if I break the relationship between tb_Funding_Area and
tb_Mod_Detail, then the update works fine. The problem then is that I can't
cascade an update or deletion to the Funding_Area field in tb_Funding_Area
Is there some other way I should be setting this up? Is there a way to fix
the problem so that I don't have to break the relationship? Any help would
be greatly appreciated, thanks!
suggest a better way to set this up.
tb_Contract has Primary Key fields: Base_ID, Contract_Number
tb_DO has Primary key fields: Base_ID, Contract_Number, DO_Number
tb_Mod has Primary key fields: Base_ID, Contract_Number, DO_Number, Mod_Number
tb_Funding_Area has primary key fields: Base_ID, Contract_Number, DO_Number,
Funding_Area
tb_Mod_Detail has primary key fields: Base_ID, Contract_Number, DO_Number,
Mod_Number, Funding_Area, Project_Number
Now, the relationships between them are all based on the fields that they
share. So the hierarchy goes:
tb_Contract (1-many) tb_DO (Base_ID, Contract_Number)
tb_DO (1-many) tb_Mod (Base_ID, Contract_Number, DO_Number)
tb_DO (1-many) tb_Funding_Area (Base_ID, Contract_Number, DO_Number)
tb_Mod (1-many) tb_Mod_Detail (Base_ID, Contract_Number, DO_Number,
Mod_Number)
tb_Funding_Area (1-many) tb_Mod_Detail (Base_ID, Contract_Number, DO_Number,
Funding_Area)
Ok, given that (I hope it was understandable , let me add that all of the
relationships have cascading updates and deletes set. The problem I'm having
is that when I try to update a contract_number in tb_Contract, the cascading
update fails with the error message:
"-2147467259 : Cannot perform cascading operation. There must be a related
record in table 'tb_mod'."
However, if I break the relationship between tb_Funding_Area and
tb_Mod_Detail, then the update works fine. The problem then is that I can't
cascade an update or deletion to the Funding_Area field in tb_Funding_Area
Is there some other way I should be setting this up? Is there a way to fix
the problem so that I don't have to break the relationship? Any help would
be greatly appreciated, thanks!