dbTalk Databases Forums  

Syntax example for DTS task.execute

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


Discuss Syntax example for DTS task.execute in the microsoft.public.sqlserver.dts forum.



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

Default Syntax example for DTS task.execute - 07-26-2004 , 04:17 PM






I am writing logic where I use an ExecuteSQL task to
define multiple source views, then want to use data pump
tasks to pump from each of 12 source views to a target
table.

To do this, I have defined 1 datapump task and disabled
it so it does not run as part of the automatic workflow.
Then I have written an ActiveX script task to change the
source objectName and execute the task 12 times in a loop.

My problem is with the syntax of the task.execute
method. Books online tells me the parameters
are "object.Execute pPackage, pPackageEvents,
pPackageLog, pTaskResult" but gives no example of
declaring and ionitializing the needed references and
calling the method. Searching google and the knowledge
base has also failed to come up with the cookbook code I
need. I have flailed trying to get it right, and still
get a type mismatch error when I call the method.

Can someone please provide a "hello world" example that
uses dtstask.execute? Thanks much in advance.

If you wish to reply to me directly, you may email v-
normb (AT) foobar (DOT) com, where foobar = the name of the world's
biggest software company (the makers of sql server, bless
and curse them).

Thanks again,

nb

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

Default Re: Syntax example for DTS task.execute - 07-26-2004 , 06:18 PM






I think the simple answer is that the task execute method is internal only.

There is also a step execute method, which makes more sense if you think
about the relationship between the two, but again this is really only for
internal use although it has been used in this context.

The generally recognised way of doing this is slightly more work, and
involves using workflow to re-execute the task through the normal run-time
scheduler style process.

Some examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

Simple Loop Example
http://www.sqldts.com/redir.aspx?1295


--
Darren Green
http://www.sqldts.com

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

Quote:
I am writing logic where I use an ExecuteSQL task to
define multiple source views, then want to use data pump
tasks to pump from each of 12 source views to a target
table.

To do this, I have defined 1 datapump task and disabled
it so it does not run as part of the automatic workflow.
Then I have written an ActiveX script task to change the
source objectName and execute the task 12 times in a loop.

My problem is with the syntax of the task.execute
method. Books online tells me the parameters
are "object.Execute pPackage, pPackageEvents,
pPackageLog, pTaskResult" but gives no example of
declaring and ionitializing the needed references and
calling the method. Searching google and the knowledge
base has also failed to come up with the cookbook code I
need. I have flailed trying to get it right, and still
get a type mismatch error when I call the method.

Can someone please provide a "hello world" example that
uses dtstask.execute? Thanks much in advance.

If you wish to reply to me directly, you may email v-
normb (AT) foobar (DOT) com, where foobar = the name of the world's
biggest software company (the makers of sql server, bless
and curse them).

Thanks again,

nb



Reply With Quote
  #3  
Old   
Norm Bowler
 
Posts: n/a

Default Re: Syntax example for DTS task.execute - 07-27-2004 , 11:07 AM



Thanks much. That was just the nudge I needed to get my thinking onto a new
track. sqldts.com is now bookmarked.

nb

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
I think the simple answer is that the task execute method is internal only.

There is also a step execute method, which makes more sense if you think
about the relationship between the two, but again this is really only for
internal use although it has been used in this context.

The generally recognised way of doing this is slightly more work, and
involves using workflow to re-execute the task through the normal run-time
scheduler style process.

Some examples-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

How to export all tables in a database
(http://www.sqldts.com/default.aspx?299)

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

Simple Loop Example
http://www.sqldts.com/redir.aspx?1295


--
Darren Green
http://www.sqldts.com

"Norm Bowler" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:474001c47355$ea6fb3e0$a301280a (AT) phx (DOT) gbl...
I am writing logic where I use an ExecuteSQL task to
define multiple source views, then want to use data pump
tasks to pump from each of 12 source views to a target
table.

To do this, I have defined 1 datapump task and disabled
it so it does not run as part of the automatic workflow.
Then I have written an ActiveX script task to change the
source objectName and execute the task 12 times in a loop.

My problem is with the syntax of the task.execute
method. Books online tells me the parameters
are "object.Execute pPackage, pPackageEvents,
pPackageLog, pTaskResult" but gives no example of
declaring and ionitializing the needed references and
calling the method. Searching google and the knowledge
base has also failed to come up with the cookbook code I
need. I have flailed trying to get it right, and still
get a type mismatch error when I call the method.

Can someone please provide a "hello world" example that
uses dtstask.execute? Thanks much in advance.

If you wish to reply to me directly, you may email v-
normb (AT) foobar (DOT) com, where foobar = the name of the world's
biggest software company (the makers of sql server, bless
and curse them).

Thanks again,

nb





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.