DTS: Create Process Task and Data Driven Query Task properties 
Author Message
 DTS: Create Process Task and Data Driven Query Task properties

Thanks Euan, but I'm still having trouble.  I still get the error -- Task
'CopyFile' not found.  But my task isn't a custom task?  It's just an
execute process task I called CopyFile.
In a DTS package, connection names must be unique since they are part of a
collection, but I can create multiple Data Driven Query tasks, SQL tasks,
and Execute Process tasks all with the same name.  So I'm guessing that
those tasks must have some other unique way of being identified.  Or is it
not possible to change the properties of those tasks at run time?
Quote:

>The code snippet below should show you how to do this.

>-Euan
>---------------------------------------------------------------------------
-
>----------------

>Private Sub ResetConnection
> Dim oPackage
> Dim oPump

> set oPackage = DTSGlobalVariables.Parent
> set oPump = oPackage.Tasks("BuildMini_Task").CustomTask

> oPump.SourceSQLStatement = "SELECT City, Region, Country FROM Suppliers"
>End Sub



>> I have a CreateProcessTask called 'CopyFile' in my DTS Package.  I'd like
>to
>> change the ProcessCommandLine property at run time depending on a global
>> variable.  I just can't figure out how to do it.

>> I can access a connections properties by saying:
>>     Set cn = DTSGlobalVariables.Parent.Connections("Output")
>>     cn.DataSource = DTSGlobalVariables("OutputFilename").Value

>> Shouldn't I be able to do the same with a task?  I try, but it tells me
>that
>> this task doesn't exist.
>> Set ts = DTSGlobalVariables.Parent.Tasks("CopyFile")
>> ts.Timeout = 1
>> ts.(property) = ....

>> Help please.



Fri, 15 Feb 2002 03:00:00 GMT
 DTS: Create Process Task and Data Driven Query Task properties

Mike,
Are you sure you are "naming" them? You cannot do this through the
UI, where you enter descriptions, which do not have to be unique.

To try this use the ScriptPkg program to save the package to VB then you can
read the properties of the tasks.

I suspect this is still the problem, if you have given your task a
description
of 'CopyFile' then DTS will not be able to index into the collection,
hence CopyFile not found.

-Euan

Quote:
> Thanks Euan, but I'm still having trouble.  I still get the error -- Task
> 'CopyFile' not found.  But my task isn't a custom task?  It's just an
> execute process task I called CopyFile.
> In a DTS package, connection names must be unique since they are part of a
> collection, but I can create multiple Data Driven Query tasks, SQL tasks,
> and Execute Process tasks all with the same name.  So I'm guessing that
> those tasks must have some other unique way of being identified.  Or is it
> not possible to change the properties of those tasks at run time?

> >The code snippet below should show you how to do this.

> >-Euan

>---------------------------------------------------------------------------
> -
> >----------------

> >Private Sub ResetConnection
> > Dim oPackage
> > Dim oPump

> > set oPackage = DTSGlobalVariables.Parent
> > set oPump = oPackage.Tasks("BuildMini_Task").CustomTask

> > oPump.SourceSQLStatement = "SELECT City, Region, Country FROM Suppliers"
> >End Sub



> >> I have a CreateProcessTask called 'CopyFile' in my DTS Package.  I'd
like
> >to
> >> change the ProcessCommandLine property at run time depending on a
global
> >> variable.  I just can't figure out how to do it.

> >> I can access a connections properties by saying:
> >>     Set cn = DTSGlobalVariables.Parent.Connections("Output")
> >>     cn.DataSource = DTSGlobalVariables("OutputFilename").Value

> >> Shouldn't I be able to do the same with a task?  I try, but it tells me
> >that
> >> this task doesn't exist.
> >> Set ts = DTSGlobalVariables.Parent.Tasks("CopyFile")
> >> ts.Timeout = 1
> >> ts.(property) = ....

> >> Help please.



Fri, 15 Feb 2002 03:00:00 GMT
 DTS: Create Process Task and Data Driven Query Task properties


Quote:

> To try this use the ScriptPkg program to save the package to VB then
you can
> read the properties of the tasks.

What/Where is that program(ScriptPkg), sounds interesting.

Ray

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Sun, 17 Feb 2002 03:00:00 GMT
 DTS: Create Process Task and Data Driven Query Task properties
From the CD \samples\devtools\dts\dtsdemo.exe

Is a self extracting file that contains scriptpkg. A vb prog with source
that scripts out a local dts package into VB.

-Euan

Quote:



> > To try this use the ScriptPkg program to save the package to VB then
> you can
> > read the properties of the tasks.

> What/Where is that program(ScriptPkg), sounds interesting.

> Ray

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Sun, 17 Feb 2002 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Trigger SQL Query...In Data Driven Task Properties

2. Data Driven Query Task properties

3. dynamic properties task and olap processing task

4. DTS - Data Driven Query Task

5. DTS Data Driven Query Task

6. DTS Data Driven Query Task

7. DTS data driven query task

8. Using DTS Data Driven Query Task

9. DTS Data Driven Query task

10. Using a Dynamic Properties Task to set a Custom Task in DTS

11. Replication transform Data Driven Query Task does not create DTSLookups object

12. DTS Transform Data Task fails in job where DTS Execute SQL Task does not


 
Powered by phpBB® Forum Software