dbTalk Databases Forums  

How do I Call/Execute a SQL Task from an ActiveX Task?

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


Discuss How do I Call/Execute a SQL Task from an ActiveX Task? in the microsoft.public.sqlserver.dts forum.



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

Default How do I Call/Execute a SQL Task from an ActiveX Task? - 08-18-2004 , 11:00 AM






Overview of package:

SQLTASK1->DynamicPropertyTask->SQLConnection->TextFileConnection->SQLTASK2->SQLTask3->ActiveXTask


I have a table (Export) that consists of 1 column ExportID. The
package grabs the first ID in the table into a global variable. It
uses this value to grab the data in a corresponding table and then
export that data to a flat file. After the export has successfully
completed, the ID stored in the global variable is deleted from the
Export table. The next step in the package looks at the Export table
to see if another ID is waiting to be exported. If it is, the
ExportID global variable is reset to the new ID in the Export table.

This is where I am at a stand still...I would like to be able to call
the first step in my package to start the whole loop again if there is
a value in the ExportID global variable. If there is no value in the
export table, I would like the package to just finish.

Is there a way to simply call the SQLTask1 so that the process is
started again?

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: How do I Call/Execute a SQL Task from an ActiveX Task? - 08-18-2004 , 03:24 PM






In message <fea127bc.0408180800.37c806a (AT) posting (DOT) google.com>, Matt Morgan
<mmorgan (AT) unitedequity (DOT) biz> writes
Quote:
Overview of package:

SQLTASK1->DynamicPropertyTask->SQLConnection-
TextFileConnection->SQLTASK2->SQLTask3->ActiveXTask


I have a table (Export) that consists of 1 column ExportID. The
package grabs the first ID in the table into a global variable. It
uses this value to grab the data in a corresponding table and then
export that data to a flat file. After the export has successfully
completed, the ID stored in the global variable is deleted from the
Export table. The next step in the package looks at the Export table
to see if another ID is waiting to be exported. If it is, the
ExportID global variable is reset to the new ID in the Export table.

This is where I am at a stand still...I would like to be able to call
the first step in my package to start the whole loop again if there is
a value in the ExportID global variable. If there is no value in the
export table, I would like the package to just finish.

Is there a way to simply call the SQLTask1 so that the process is
started again?

DTSGlobalVariables.Parent. _
Steps("SQLTASK1"). _
ExecutionStatus = DTSStepExecStat_Waiting

Several loop examples here-

Workflow
(http://www.sqldts.com/default.aspx?103)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.