![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Friends, Can can any bady help me to call custome task here is small snipet CallSP("EXEC USP_DeleteReportingRecords 'Month To Date Half Hourly Report', '07/15/2005'") Function CallSP(Strsql) Dim oPkg Dim oExecSQL Dim objTask Dim sSQLStatement set oPkg = DTSGlobalVariables.Parent set oExecSQL= oPkg.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTa sk oExecSQL.SQLStatement = Strsql set objTask = oPkg.Steps("DTSStep_DTSExecuteSQLTask_1") objTask.ExecutionStatus = DTSStepExecStat_Waiting ' objTask.Execute ' I would like to run DTSExecuteSQL here it self. Set oExecSQL = Nothing Set oPkg = Nothing CallSP = DTSTaskExecResult_Success End Function I written this function in ActiveX Script. this will be called n number of times. before success of ActiveX script, executeSQL Task will be called. I wating for your valuable responce. Thanks and Regards, Rajesh |
#3
| |||
| |||
|
|
Sounds like you want a loop and I have never needed to execute a task by itself through the object model. Try and adapt this Looping, Importing and Archiving (http://www.sqldts.com/default.aspx?246) Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know On Tue, 30 Aug 2005 05:38:50 -0700, "Rajesha" <Rajesha (AT) discussions (DOT) microsoft.com> wrote: Hi Friends, Can can any bady help me to call custome task here is small snipet CallSP("EXEC USP_DeleteReportingRecords 'Month To Date Half Hourly Report', '07/15/2005'") Function CallSP(Strsql) Dim oPkg Dim oExecSQL Dim objTask Dim sSQLStatement set oPkg = DTSGlobalVariables.Parent set oExecSQL= oPkg.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTa sk oExecSQL.SQLStatement = Strsql set objTask = oPkg.Steps("DTSStep_DTSExecuteSQLTask_1") objTask.ExecutionStatus = DTSStepExecStat_Waiting ' objTask.Execute ' I would like to run DTSExecuteSQL here it self. Set oExecSQL = Nothing Set oPkg = Nothing CallSP = DTSTaskExecResult_Success End Function I written this function in ActiveX Script. this will be called n number of times. before success of ActiveX script, executeSQL Task will be called. I wating for your valuable responce. Thanks and Regards, Rajesh |
![]() |
| Thread Tools | |
| Display Modes | |
| |