dbTalk Databases Forums  

RE: dynamically changing datapump sourcesqlstatement

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


Discuss RE: dynamically changing datapump sourcesqlstatement in the microsoft.public.sqlserver.dts forum.



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

Default RE: dynamically changing datapump sourcesqlstatement - 07-07-2004 , 03:34 PM






Ok, well I'll partially answer my question here...

Everything works great if I use a dynamic properties task to accomplish this, but, I would like to know how to properly do this in an active-x task. If anyone knows, I would appreciate your reply.

Thanks,

Tom

"Tom" wrote:

Quote:
I have a datasource in a data pump for which I wish to dynamically change the source SQL statement. Would the following active-x task code snippet work or is there a better way?

Dim oTask

Set oTask = DTSGlobalvariables.Parent.Tasks("DTSTask_DTS_Mytas kName")
oTask.SourceSQLStatement = "SELECT * FROM AUTHORS"

Thanks,

Tom


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

Default Re: dynamically changing datapump sourcesqlstatement - 07-07-2004 , 04:08 PM






In message <42F395A8-7371-4EDF-BD90-51EDCCF7EEFD (AT) microsoft (DOT) com>, Tom
<Tom (AT) discussions (DOT) microsoft.com> writes
Quote:
Ok, well I'll partially answer my question here...

Everything works great if I use a dynamic properties task to accomplish
this, but, I would like to know how to properly do this in an active-x
task. If anyone knows, I would appreciate your reply.

Thanks,

Tom

"Tom" wrote:

I have a datasource in a data pump for which I wish to dynamically
change the source SQL statement. Would the following active-x task
code snippet work or is there a better way?

Dim oTask

Set oTask = DTSGlobalvariables.Parent.Tasks("DTSTask_DTS_Mytas kName")
oTask.SourceSQLStatement = "SELECT * FROM AUTHORS"

Thanks,

Tom

You need to use ...Tasks("ff").CustomTask

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)

--
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.