dbTalk Databases Forums  

Changing properties dynamically with ActiveX

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


Discuss Changing properties dynamically with ActiveX in the microsoft.public.sqlserver.dts forum.



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

Default Changing properties dynamically with ActiveX - 04-15-2005 , 09:21 PM






Hello,
I don't get it! I try to change properties dynamically by using the
DynamicPropertiesTaskAssignment Object. I have no clue if this is the correct
way to do but I want to read in a ini-File/query and process the information
as shown below:

Set oAssignment = oCustomTask.Assignments.New
oAssignment.SourceType = 0
oAssignment.SourceIniFileKey = "HOST_DNS"
oAssignment.SourceIniFileSection = "IPS_Environment"
oAssignment.SourceIniFileFileName =
"\\chka2011\GRI\ZIRIS\CEC_Migration\DTS\INI_Source \IPS_DTS_Config.ini"
oAssignment.SourceQueryConnectionID = -1
oAssignment.DestinationPropertyID = "'Connections';'Connection
1';'Properties';'DataSource'"

oCustomTask.Assignments.Add oAssignment
Set oAssignment = Nothing

Can somebody explain me how this has to be coded? When I look a the DTS
Object Model I can't figure it out. It is more a trial and error approach.
Regards
Rene

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Changing properties dynamically with ActiveX - 04-16-2005 , 02:47 AM






We do something very similar here

How to add a Dynamic Properties task to a package and manipulate it using VB.
(http://www.sqldts.com/default.aspx?252)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,
I don't get it! I try to change properties dynamically by using the
DynamicPropertiesTaskAssignment Object. I have no clue if this is the correct
way to do but I want to read in a ini-File/query and process the information
as shown below:

Set oAssignment = oCustomTask.Assignments.New
oAssignment.SourceType = 0
oAssignment.SourceIniFileKey = "HOST_DNS"
oAssignment.SourceIniFileSection = "IPS_Environment"
oAssignment.SourceIniFileFileName =
"\\chka2011\GRI\ZIRIS\CEC_Migration\DTS\INI_Source \IPS_DTS_Config.ini"
oAssignment.SourceQueryConnectionID = -1
oAssignment.DestinationPropertyID = "'Connections';'Connection
1';'Properties';'DataSource'"

oCustomTask.Assignments.Add oAssignment
Set oAssignment = Nothing

Can somebody explain me how this has to be coded? When I look a the DTS
Object Model I can't figure it out. It is more a trial and error approach.
Regards
Rene



Reply With Quote
  #3  
Old   
Rene H
 
Posts: n/a

Default Re: Changing properties dynamically with ActiveX - 04-17-2005 , 05:01 AM



Hi Allan

Thanks for pointing me to this side. In fact I have seen this already (great
and very usefull side!!) and it worked for me with one exception: My DTS is
in a structured storage file on a server. As long as I'm in the DTS designer
on my workstation it works well but starting the DTS with a scheduled job
just produces unpredictable results.

That why I started to look for a solution to alter the properties in a task
directly and apply the content of the ini-file to the properties.

Any ideas?!

Thanks
Rene

"Allan Mitchell" wrote:

Quote:
We do something very similar here

How to add a Dynamic Properties task to a package and manipulate it using VB.
(http://www.sqldts.com/default.aspx?252)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Hello,
I don't get it! I try to change properties dynamically by using the
DynamicPropertiesTaskAssignment Object. I have no clue if this is the correct
way to do but I want to read in a ini-File/query and process the information
as shown below:

Set oAssignment = oCustomTask.Assignments.New
oAssignment.SourceType = 0
oAssignment.SourceIniFileKey = "HOST_DNS"
oAssignment.SourceIniFileSection = "IPS_Environment"
oAssignment.SourceIniFileFileName =
"\\chka2011\GRI\ZIRIS\CEC_Migration\DTS\INI_Source \IPS_DTS_Config.ini"
oAssignment.SourceQueryConnectionID = -1
oAssignment.DestinationPropertyID = "'Connections';'Connection
1';'Properties';'DataSource'"

oCustomTask.Assignments.Add oAssignment
Set oAssignment = Nothing

Can somebody explain me how this has to be coded? When I look a the DTS
Object Model I can't figure it out. It is more a trial and error approach.
Regards
Rene




Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Changing properties dynamically with ActiveX - 04-17-2005 , 05:12 AM



Technically there is no difference in a package when their storage locations change. The difference you re more than likely seeing
is due to the scheduled job side of things.

Have a look here and see if it helps

http://support.microsoft.com/?kbid=269074

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi Allan

Thanks for pointing me to this side. In fact I have seen this already (great
and very usefull side!!) and it worked for me with one exception: My DTS is
in a structured storage file on a server. As long as I'm in the DTS designer
on my workstation it works well but starting the DTS with a scheduled job
just produces unpredictable results.

That why I started to look for a solution to alter the properties in a task
directly and apply the content of the ini-file to the properties.

Any ideas?!

Thanks
Rene

"Allan Mitchell" wrote:

We do something very similar here

How to add a Dynamic Properties task to a package and manipulate it using VB.
(http://www.sqldts.com/default.aspx?252)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Hello,
I don't get it! I try to change properties dynamically by using the
DynamicPropertiesTaskAssignment Object. I have no clue if this is the correct
way to do but I want to read in a ini-File/query and process the information
as shown below:

Set oAssignment = oCustomTask.Assignments.New
oAssignment.SourceType = 0
oAssignment.SourceIniFileKey = "HOST_DNS"
oAssignment.SourceIniFileSection = "IPS_Environment"
oAssignment.SourceIniFileFileName =
"\\chka2011\GRI\ZIRIS\CEC_Migration\DTS\INI_Source \IPS_DTS_Config.ini"
oAssignment.SourceQueryConnectionID = -1
oAssignment.DestinationPropertyID = "'Connections';'Connection
1';'Properties';'DataSource'"

oCustomTask.Assignments.Add oAssignment
Set oAssignment = Nothing

Can somebody explain me how this has to be coded? When I look a the DTS
Object Model I can't figure it out. It is more a trial and error approach.
Regards
Rene






Reply With Quote
  #5  
Old   
Rene H
 
Posts: n/a

Default Re: Changing properties dynamically with ActiveX - 04-18-2005 , 04:51 AM



Hi Allan
I was completely on the wrong track and managed now to add properties
dynamically to a package.
What I did wrong: I placed the ActiveX Task in the same package I wanted to
have the dynamic property. That caused some hick up.
The solution: I created a package just holding the ActiveX task and now it
works fine.

The final solution is here:
http://tech.renehug.com/documents/Ac...Properties.vbs

Cheers & thanks for the support.
Rene

"Allan Mitchell" wrote:

Quote:
Technically there is no difference in a package when their storage locations change. The difference you re more than likely seeing
is due to the scheduled job side of things.

Have a look here and see if it helps

http://support.microsoft.com/?kbid=269074

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Hi Allan

Thanks for pointing me to this side. In fact I have seen this already (great
and very usefull side!!) and it worked for me with one exception: My DTS is
in a structured storage file on a server. As long as I'm in the DTS designer
on my workstation it works well but starting the DTS with a scheduled job
just produces unpredictable results.

That why I started to look for a solution to alter the properties in a task
directly and apply the content of the ini-file to the properties.

Any ideas?!

Thanks
Rene

"Allan Mitchell" wrote:

We do something very similar here

How to add a Dynamic Properties task to a package and manipulate it using VB.
(http://www.sqldts.com/default.aspx?252)

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Rene H" <ReneH (AT) discussions (DOT) microsoft.com> wrote

Hello,
I don't get it! I try to change properties dynamically by using the
DynamicPropertiesTaskAssignment Object. I have no clue if this is the correct
way to do but I want to read in a ini-File/query and process the information
as shown below:

Set oAssignment = oCustomTask.Assignments.New
oAssignment.SourceType = 0
oAssignment.SourceIniFileKey = "HOST_DNS"
oAssignment.SourceIniFileSection = "IPS_Environment"
oAssignment.SourceIniFileFileName =
"\\chka2011\GRI\ZIRIS\CEC_Migration\DTS\INI_Source \IPS_DTS_Config.ini"
oAssignment.SourceQueryConnectionID = -1
oAssignment.DestinationPropertyID = "'Connections';'Connection
1';'Properties';'DataSource'"

oCustomTask.Assignments.Add oAssignment
Set oAssignment = Nothing

Can somebody explain me how this has to be coded? When I look a the DTS
Object Model I can't figure it out. It is more a trial and error approach.
Regards
Rene







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.