all groups > sql server dts > october 2007 >
You're in the

sql server dts

group:

Access to data flow task


Access to data flow task ktrock
10/16/2007 12:54:00 PM
sql server dts:
Hello. I have an integration services project with a series of connections in
my control flow and a data flow task in my control flow. I can
programatically gain access to the connections in my ScriptMain but am unable
to access the data flow task or components.

It looks like I have to go through the package object. It seems that all
calls to New Package or LoadPackage() need to specify the location of the
package. What if it's right here? I'm working right in the package itself!
Can't I simply reference "me" or something? TIA.

Re: Access to data flow task Kent Tegels
10/16/2007 10:11:12 PM
Hello Ken,

In a Script Task, Me refers the Script Task itself. In a Script Component,
Me refers to Class built to objectify the componet and the buffers it passes
over. A few days ago, MikeC# was asking a question that made me want to access
the running package. I've come to the conclusion that you can't do that from
a Script Task or Component. The Component makes sense due to scope and that
its ultimately digested into an execution plan similar to how SQL queries
are turned into execution plans of operation codes (Haselden's book describes
data flows that way.) At the Task level, its less clear to me why we can't
get an handle on the executing package.

LoadPackage is really meant to allow an application to "host" the SSIS runtime
and execute a package. If you want to go that way, it appears that your application
would have considerable access to the package's properties.

But you've piqued my interest ... exactly what are you trying to do?

Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

Re: Access to data flow task ktrock
10/17/2007 8:37:01 AM
Kent, thanks. Trying to do something fairly basic. In the control flow of a
DTS package run a script that determines what OLEDB connection out of 4
possible has the nightly data we need to pull from (source connection). The 4
source DBs all have the same tables and table structures. So my data flow has
a simple data pump from source to destination. I want to programatically set
the connection manager for the source in this data flow accordingly and have
it run.

In some ways it would be easier to write a VB.Net app to do this since most
of this DTS job is inline code anyway. We've had problems trying to deploy
even the simplist .Net apps though.

Ken


[quoted text, click to view]
Re: Access to data flow task Kent Tegels
10/18/2007 12:00:00 AM
Hello ktrock,

Do you have four connection managers?

Could have just one CM and modifiy its connection string via a Script Task?

Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

AddThis Social Bookmark Button