Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 20th, 2006, 07:19 AM
lem lem is offline
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default executing DTS through ASP

Hi all,

i am having a problem executing my dts though my asp page. this is my code:
Dim objDTSPackage
    Dim objDTSStep
    Dim strResult
    Dim blnSucceeded

    Const DTSSQLStgFlag_Default = 0
    Const DTSStepExecResult_Failure = 1

    set objDTSPackage = Server.CreateObject("DTS.Package")
    blnSucceeded = True

    objDTSPackage.LoadFromSQLServer "", "sa", "lemmer", DTSSQLStgFlag_Default, "", "", "", "Replenish"
    objDTSPackage.Execute



    For each objDTSStep in objDTSPackage.Steps
        If objDTSStep.ExecutionResult = DTSStepExecResult_Failure Then
            strResult = strResult & objDTSStep.Name & " -- " & objDTSStep.ExecutionResult & "<br>"
            response.Write strResult
            'response.End

            blnSucceeded = False
        End If
    Next

i have tried to debug this by writing the string to screen but the string doesnt make any sense to me. this is what is displayed.

DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_3 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_3 -- 1
DTSStep_DTSExecuteSQLTask_1 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_3 -- 1
DTSStep_DTSExecuteSQLTask_1 -- 1
DTSStep_DTSDataPumpTask_1 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_3 -- 1
DTSStep_DTSExecuteSQLTask_1 -- 1
DTSStep_DTSDataPumpTask_1 -- 1
DTSStep_DTSDataPumpTask_2 -- 1
DTSStep_DTSExecuteSQLTask_2 -- 1
DTSStep_DTSActiveScriptTask_1 -- 1
DTSStep_DTSExecuteSQLTask_3 -- 1
DTSStep_DTSExecuteSQLTask_1 -- 1
DTSStep_DTSDataPumpTask_1 -- 1
DTSStep_DTSDataPumpTask_2 -- 1
DTSStep_DTSExecuteSQLTask_4 -- 1


 the dts has not fired correctly

i have logged the dts but nothing at all appears in the log what so ever.

i am a novice asp programmer

PLEASE HELP
P.S. the dts works perfectly when run through enterprise manager.
and i am using sql 2000

 
Old February 6th, 2007, 05:08 PM
Authorized User
 
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's a link that may be able to help you which discusses how to execute a DTS package from ASP:

http://www.sqldts.com/207.aspx

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!
http://www.sql-server-helper.com/free-test/default.aspx

Got a SQL Server Question? Ask us here: http://www.sql-server-helper.com/forums/default.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing DTS package from ASP page via SP savoym Classic ASP Basics 0 April 28th, 2005 07:02 AM
Executing a DTS package on value change gyno.bell SQL Server DTS 1 March 1st, 2005 02:50 PM
Executing DTS packages in ASP.NET bmains SQL Server DTS 2 March 17th, 2004 03:50 PM
Permissions error when executing DTS from ASP pjmair SQL Server DTS 9 February 6th, 2004 02:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.