I always thought that there could be one template to a control procedure, but just saw that it actually is possible to have more than one template to a control procedure.
Hope that someone tell me why they use multiple templates within the same control procedure. I'd like to know the advantages of using multiple templates.
What is the use of multiple templates within a control procedure?
Best answer by Erwin Ekkel
This can be used if you have the same objects but you need some templates only in a certain object. Example: If you have insert/update and delete trigger on a table you can have template A, B and C.
Update trigger has template A + B
Insert trigger has template B + C
delete trigger has template C
Now you need only 1 proc to house all the templates and you assign the necessary templates to the objects. Instead of 3 procs that you assign to multiple objects.
One advantage is that you have all available templates in the same control proc. Otherwise you would have to switch between control procs. And you can keep the naming more object focused something like triggers_table_A instead of trigger_check_for_duplicates. Making the search for the template to amend easier.
It's like you said it adds more structure if done correctly.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.