Wondering if this is possible with SQL Server

  • Here is the problem that I am trying to solve. We currently have a mail order manager application that we use. We have several vendors that we have to initiate purchase orders with, and this is currently done manually. I am converting it to do the purchase orders through a webservice, but I would like this to complete in real time. I figured the best way to do this would be to initiate a trigger when the particular table has a record inserted. This insert triggers a script, passing the order number and verifies if a purchase order needs to be initiated based on what was ordered. If it does, it contacts the webservice, gets the appropriate data, then updates the appropriate tables with the new data, all through the script. I have been doing some research, and I have heard that triggers are simply best to be avoided, and calling outside scripts could be problematic too. However, I don't see any other way to do this.

  • The problem with such "real time" apps is that no one plans on the connection being down Have your "trigger" write to a staging table and have a scheduled app sweep the staging table.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 2 (of 2 total)

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