I have searched the internet high and low for a quick solution but so far have become more dumbfounded than when I began. I have found this forum to be the most responsive and beneficial for all of my Access questions so here goes.
I have an Access 2000 front end connected to an IBM DB2 back end. I created my primary and foreign keys through my CREATE TABLE SQL and am enforcing referential integrity through DB2. Unfortunately, I need to write a trigger to enforce UPDATE CASCADE on my foreign keys. The primary key in my parent table is POLICYNUMBER. A corresponding child record may exist in any or all of my three child tables. Should the POLICYNUMBER be mistyped or need to be altered after the records are initially saved, this change clearly needs to cascade to my child tables' Foreign Keys.
Does anyone have the SQL statment to place in my trigger to accomplish this cascading update? I would assume that a SQL Server trigger would, for the most part, be compatible with DB2. For the sake of simplicity, I use the following schematic.
TableA = Parent
TableB = Child
TableC = Child
TableD = Child
I have named the primary and foreign keys POLICYNUMBER.
Since I can be somewhat dim witted, I am looking for an actual example with which I can simply change the table and field names. Any help (or simply pointing me to a solution) would be greatly appreciated. Thanks again.
Matthew
I have an Access 2000 front end connected to an IBM DB2 back end. I created my primary and foreign keys through my CREATE TABLE SQL and am enforcing referential integrity through DB2. Unfortunately, I need to write a trigger to enforce UPDATE CASCADE on my foreign keys. The primary key in my parent table is POLICYNUMBER. A corresponding child record may exist in any or all of my three child tables. Should the POLICYNUMBER be mistyped or need to be altered after the records are initially saved, this change clearly needs to cascade to my child tables' Foreign Keys.
Does anyone have the SQL statment to place in my trigger to accomplish this cascading update? I would assume that a SQL Server trigger would, for the most part, be compatible with DB2. For the sake of simplicity, I use the following schematic.
TableA = Parent
TableB = Child
TableC = Child
TableD = Child
I have named the primary and foreign keys POLICYNUMBER.
Since I can be somewhat dim witted, I am looking for an actual example with which I can simply change the table and field names. Any help (or simply pointing me to a solution) would be greatly appreciated. Thanks again.
Matthew
Last edited: