dbTalk Databases Forums  

ExecutePackageTask Filename property

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


Discuss ExecutePackageTask Filename property in the microsoft.public.sqlserver.dts forum.



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

Default ExecutePackageTask Filename property - 05-12-2005 , 08:28 AM






Hello All,

I hope someone can help me with this, I couldn't find anything on the
Internet.

I have a master package that has to execute several other sub packages.

I am using a ActiveX Script Task to set the filename properties of the
ExecutePackageTasks that execute the sub packages. The code in essense
looks like this:

Dim oPKG
Set oPKG = DTSGlobalVariables.Parent

oPKG.Tasks("DTSTask_DTSExecutePackageTask_1").File Name = "C:\..\Path to dts
package"

However, when I execute the master package I get the following error:
"Object doesn't support this property or method: oPKG.Tasks(...).FileName"

I am assuming that the statement
"oPKG.Tasks("DTSTask_DTSExecutePackageTask_1") " returns an
ExecutePackageTask object which does have this property.

Why can't I set it then?

Thanks for any help.

Gerhard

Reply With Quote
  #2  
Old   
Panch
 
Posts: n/a

Default Re: ExecutePackageTask Filename property - 05-12-2005 , 01:03 PM






did you try dynamic properties ?


Reply With Quote
  #3  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: ExecutePackageTask Filename property - 05-12-2005 , 01:20 PM



Hi Gerhard,

"Gerhard Wessels" <gerhard (AT) eastmin (DOT) co.za> schrieb im Newsbeitrag
news:On9CzZvVFHA.2520 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
Hello All,

I am using a ActiveX Script Task to set the filename properties of the
ExecutePackageTasks that execute the sub packages. The code in essense
looks like this:

Dim oPKG
Set oPKG = DTSGlobalVariables.Parent

oPKG.Tasks("DTSTask_DTSExecutePackageTask_1").File Name = "C:\..\Path to
dts
package"
try this

oPKG.Tasks("DTSTask_DTSExecutePackageTask_1").Prop erties("FileName").Value
= "C:\..\Path to dts package"

Helge




Reply With Quote
  #4  
Old   
Panch
 
Posts: n/a

Default Re: ExecutePackageTask Filename property - 05-12-2005 , 01:23 PM



Did you try Dynamic Props ?


Reply With Quote
  #5  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: ExecutePackageTask Filename property - 05-12-2005 , 01:44 PM



Hi Panch,

"Panch" <apanchanathan (AT) gmail (DOT) com> schrieb im Newsbeitrag
news:1115922180.619900.100310 (AT) o13g2000cwo (DOT) googlegroups.com...
Quote:
Did you try Dynamic Props ?
I'm not the one who asked ;-)
Your right, that you can set the property easily with the dynamic
properties task.
But when he already use an activeX task to decide which packages to
execute, its easier to set the property directly - the result is the same.

Helge




Reply With Quote
  #6  
Old   
Gerhard Wessels
 
Posts: n/a

Default Re: ExecutePackageTask Filename property - 05-13-2005 , 02:35 AM




Hi All,

Thank you for your suggstions. As often happens, just when you think you've
tried everything (including the newsgroups!) you stumble upon the answer!
The answer is:

oPKG.Tasks("DTSTask_DTSExecutePackageTask_1").Cust omTask.FileName = "C:\.
\Path to dts package".

It is the .CustomTask descendant that did the trick.

FYI
There are some limitations with using the Dynamic Properties Task and INI
files. The problem I encountered was that the content in the INI file got
chopped off at some point - file length probably, even though INI files can
go up to 64K! Mine isn't even 4K.

Anyway, I found a script that reads (and writes) an INI file. You call a
function with the path to the INI file, the section and the key you want
read and it passes back the result. Obviously with no limit to file length
(within the 64K limit of course).

Have look here:
http://dotnetjunkies.com/WebLog/amar.../09/59749.aspx

Anyway, thanks for the help.

Gerhard

Helge C. Rutz wrote:

Quote:
Hi Panch,

"Panch" <apanchanathan (AT) gmail (DOT) com> schrieb im Newsbeitrag
news:1115922180.619900.100310 (AT) o13g2000cwo (DOT) googlegroups.com...
Did you try Dynamic Props ?

I'm not the one who asked ;-)
Your right, that you can set the property easily with the dynamic
properties task.
But when he already use an activeX task to decide which packages to
execute, its easier to set the property directly - the result is the same.

Helge


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.