Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Triggering External Application

Author  Topic 

strattate
Starting Member

1 Post

Posted - 2004-04-02 : 17:08:01
I wrote an app in VB that connects to a company's website (we are a reseller) and automatically places an order. The problem is our front end to the database is a 3rd party billing system. If I could add this app into the billing software I wouldn't have a problem, but I can't.

Somehow I need to trigger this small application once the order has been entered into the DB. I've considered using xp_cmdshell from a trigger to call the app, but that leads to my problem...the application is interative.

I'm fairly new to SQL and wondered if anyone had any tips or tricks to do something like this.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-02 : 19:33:21
You can not use xp_cmdshell to launch an interactive application. It would launch in another session, so you would not be able to see it.

I do not have a solution for you though. Perhaps a service could be written to check if an order has been entered into the database. The service would launch the application. Of course, there would be a delay though.

Tara
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-04-03 : 03:55:19
Can you make the application non-interactive?
Otherwise you can leave the app polling a table waiting for an order. The trigger places an entrty into the table and the app services it.
Maybe split the app into interactive and non-interactive parts - think about making a dll from the non-interactive part and using the sp_oa... SPs to run it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -