NetTalk Central

Author Topic: DCT Triggers vs Embed code  (Read 3306 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
DCT Triggers vs Embed code
« on: March 20, 2015, 12:28:40 AM »
Hallo,


In one project (TopSpeed database) I need to maintain a table with statistics from other table when Insert/Update or Delete occur. Sometimes there will be 30-50 concurrent user that insert/update/delete records. What will be a good way to go? To use trigger in DCT or embed code? ... will be trigger better for this scenario?
Also I saw that with trigger I cannot use p_web...

Thank you for any help/suggestions.

Regards,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: DCT Triggers vs Embed code
« Reply #1 on: March 20, 2015, 02:56:10 AM »
Hi Robert,

>> To use trigger in DCT or embed code?

You can use a client-side trigger in the dict. You could embed into the File Manager objects (ie global embeds) or you could embed into the individual forms. Which one you choose is up to you.

>> ... will be trigger better for this scenario? The trigger just generates code into the FileManager embeds, so it's functionally the same. But if you declare the trigger in the dict then it will be there for other apps that use this dictionary.

>> Also I saw that with trigger I cannot use p_web...

Correct. p_web is not in scope in the global file manager objects. If you need p_web then you'll have to embed in the forms individually.

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: DCT Triggers vs Embed code
« Reply #2 on: March 20, 2015, 06:57:14 AM »
Thank you for explanation.
NetTalk also use nice embeds for insert,update and delete (pre,post). The same like a trigger. This way I better choose NetTalk embeds.

Regards,
Robert