Trigger

  • Can I have a trigger save a response to a file? If not, then how do I send the response through NetSend to an application polling for information? I am new to SQL and need help.

  • You can call xp_cmdshell to execute an external process with parameters.

  • It is considered a worst practice to call external process from within a trigger.

    One thing you could do is create a table with 1 row and a few columns. You could then update that row to flag that x event hapenned. Then you can code to app to check this table every x minutes to see if something new as occured... or it could be done on the server but it depends on what kind of notification you need to put in place.

  • from what the application is telling me, it either polls a file or an email sets it off. The name of the program is Bartender Label Design. the polling is critical for us to completely automate our process instead of haveing to keep the application up and picking and choosing which labels to print and when.

  • Well then I would suggest to do as I proposed, but I would choose to have a job run every minute or so (however often you need). This job would then create the output file as needed if the flags are set. I would use a dts package to create the file as you can use vbscripting and its filesystemobject. The application could then poll the file and does what it needs.

  • Thanks, I'll try it out and keep you posted.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply