how to prevent a user form editing a record in a table that is referenced in another tabe

  • 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

  • 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.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • If you're not updating or inserting into the master table, you could put it on a read-only file group.

  • 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