What type of trigger and what syntax should I write if I need to automatically update foreign key field (loc_no for example) in the TEST table (for example) when the use make changes to the primary key (loc_no) in the Locations table
based on the business needs u can choose the type of trigger
if the form is complex , which calls aother forms or
if the modified location is being used in next part of the form
write it in key_next_item trigger or next_record trigger
ideally i belive it should be written just before saving the record . once all validations are checked . when_button_pressed .
1) insert a new record in the master table , with modified record location ( primary key column )
2) update the child records to the new location .
then drop the previous record for old location
. this is not a good solution .
if such a requirement is their , . handle all database constraints in the forms level
remove it at database level best is put some other column as primary key . by doing this "commit" part could be removed in the middle of the transaction .