September 18, 2008 at 11:46 am
I have and VB6 activex. When the table is updated I want to fire a trigger passing in the new parameters to the ActiveX. Example site would be helpful.
Thanks
September 18, 2008 at 12:04 pm
avoid doing anything in a trigger not realted DIRECTLY to the data...an activex object could cause the trigger to rollback, or lock the table as the trigger waits for the Activex to complete, as well as affect performance. Often times a trigger like that does not take into consideration whenever multiple rows are inserted/updated...
you'll might notice that there are similar request sto send an email inside the trigger; regardless of the work to be done, it usually doesn't need to be done prior or during the trigger/data events.
As far as I know, the recommended solution is to create a separate run/notification table, and insert data into THAT table based on the trigger.
then a seperate scheduled job, running every X minutes or something, trolls the run/notification table, and does it's thing for each row in the table that was not previously processed (obviously needs to set a flag of somesort in the table to show the row was processed)
that way, if the job fails, the next time it runs, it picks up the rows it didn't process before...no harm, just late notification, or a delay in the execution of whatever business logic your activex does.
Lowell
September 19, 2008 at 8:11 am
I completely agree that calling any kind of activeX object from a trigger is probably a risky proposition.
The logging table / job method should really be done via service broker now. Service broker will basically queue up tasks and then process them in the appropriate order. Sending a message to a local service broker queue is sometimes referred to as an asynchronous trigger.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply