• You can also use VBA and ADO to execute a stored procedure that calls the DTS package. Here's an example of a stored procedure that uses the system stored procedure xp_cmdshell and the dtsrun.exe command to execute the package:

    CREATE PROC ap_CallDTS

    AS

    SET NOCOUNT ON

    DECLARE @cmd varchar(255)

    DECLARE @error int

    --command string

    SET @cmd = 'dtsrun.exe /S MYSQLSERVER /U myusername /P mypassword /N MyDTSpackageName'

    --Exec DTS package

    EXEC @error = master..xp_cmdshell @cmd

    Return @error