dbTalk Databases Forums  

DTS Script Help Required

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS Script Help Required in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mali
 
Posts: n/a

Default DTS Script Help Required - 05-13-2004 , 12:51 AM






I have an Active X Script defined for a DTS... During the execution of this script, I want to execute some other DTS as a part of the execution. Is there any command to run some other existing DTS this way ? I need some help...

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Script Help Required - 05-13-2004 , 01:43 AM






Sure.

You can use the DTS Object model inside an ActiveScript task and call the
other package

What about something like

Function Main()

Const DTSSQLStgFlag_UseTrustedConnection = 256
Main = DTSTaskExecResult_Success

Dim oPKG
Set oPKG = CreateObject("DTS.Package")
oPKG.LoadFromSQLServer ".", , , DTSSQLStgFlag_UseTrustedConnection,
, , , "PackageName"
oPKG.Execute

Dim oStep
For Each oStep In oPKG.Steps
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
MsgBox oStep.Name & " Failed"
Main = DTSTaskExecResult_Failure
End If
Next
oPKG.Uninitialize()
Set oPKG = Nothing

End Function


--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Mali" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have an Active X Script defined for a DTS... During the execution of
this script, I want to execute some other DTS as a part of the execution. Is
there any command to run some other existing DTS this way ? I need some
help...




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.