Opening An Application With SQL Code

  • I'm trying to create a package in SQL which will cause a different application to open, and then will send arguments to the new application to guide how it executes. Can that be done?

  • I can think of two ways, but I am not sure about the details.

    1. Launch a command prompt (execute process task) and add the parameters when calling the application as command line options.

    2. Create an extended stored procedure, and invoke that from within your task. An extended SP is encapsulated in a DLL, so you can do anything you want to get the parameters to the application.

  • From your post I'm not sure of your context. NPeeters is right, however I'm wondering when you say 'controlling the execution' you're really talking about running the app' from within you Stored Procedure or ceding control to the app'. Check out the family of sp_OA... system supplied stored procedures. Thes basically use OLE Authomation to allow you to run and control an app from within an ssp

    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961


    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961

  • You may also want to look at xp_cmdshell in BOL if the app excepts cmd line parameters.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 4 posts - 1 through 3 (of 3 total)

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