![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |