DTS Package & Excel

L

Lynn

I am using SQL Server 2000 and Access 2000. Does anyone
have the code to run a DTS package via a command button on
an Access form.

Also, if the package runs successfully I would like it to
open up an Excel file.
 
J

J. Clay

I created a stored procedure to run my dts package and used the following
command:

EXEC master..xp_cmdshell 'DTSRun /S SQLServer /N "Update Web Data" /E',
NO_OUTPUT

You can lookup DTSRun & xp_cmdshell in SQL Books On Line for more info.
After the SP is complete you can then open an Excel file. One option for
this would be to use the Application.FollowHyperlink (?) command in access.
Look that up in help to get the specific usage.

HTH,
J. Clay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top