November 7, 2004 at 8:08 am
I would like to execute a DTS task from a simple VB program on a users desktop. In essence, a simple "run the DTS" button on the users machine, written in an VB.EXE program, that will launch the DTS task to fill a table in SQL Server 2000. Any hints would be great...If the DTS task can be run in any other way - again, a simple button on the users desktop that would fire the DTS task - I would be interested in that as well...
Thanks
November 7, 2004 at 9:03 am
You can redistribute the DTS DLLs onto the client machine if you need to. If you just want to run the program on the server, but initiate from teh client machine, you can do 2 things.
1. Make a job and call sp_start_job from your VB program with the parameters to start that job.
2. Set a reference to the DTS DLLs from VB, create a package object, then execute that.
http://www.sqldts.com is a good place to start.
November 7, 2004 at 11:37 pm
Hi Ray,
Our Group was loathe to install DTS on the clients, because the jobs will run in the context of the client. We like to keep things on the Server, so we created a DLL which called the DTS job (similar to #2 in Steve's post), and then called in a stored procedure using SP_OACreate. This way the VB Clients can use standard ADO command objects to call the procedure which calls the DTS. The Security is easier to manage, and the installer is less trouble. the Big advantage is that paths to server resources for DTS jobs are fixed. If you have an Excel Document that is stored on a Network share, and many clients may not have a mapping to that share, then if the DTS job is run from the client, it can fail, but it can run on the server just fine...
Cheers,
John R. Hanson
November 8, 2004 at 5:37 am
Thanks John and Steve, I will give it a try...
Ray
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply