May 4, 2011 at 9:52 pm
Please tell me how to lock a record in master table that is been referenced in another table.
A user must not be allowed to edit any field in that master table if it is referenced.
Thank you
May 5, 2011 at 1:41 am
You could either add a foreign key constraint with no cascading actions or change the user permission to deny update of that specific column. The former would be the solution to prevent such changes in general and the latter would be recommended if there are some users being allowed to change it. In such a scenario an additional foreign key constraint with a cascading update would be my preferred solution.
May 6, 2011 at 8:43 am
If you're not updating or inserting into the master table, you could put it on a read-only file group.
May 6, 2011 at 9:41 am
You don't want to lock the record, you want to prevent changes, correct?
A FK can help if you have explicitly declared them as a constraint. Then all the referencing items would need to change before the parent value could be changed. Make sure you do not allow cascading updates.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply