开发者

SSIS XML DTSConfig update (VS 2005)

I have a DTS package with a XML configuration (.dtsconfig) file where i have some information that开发者_StackOverflow needs to be updated every time the package runs.

Is there a way to update the .dtsconfiguration file?

Thanks


Ok. i haven't found a way to do this so i created a script that updated the elements i wanted.

Dim xml As Xml.XmlDocument
Dim xpathTemplate As String
Dim fname As String

xpathTemplate = "/DTSConfiguration/Configuration[@Path='\Package.Variables[User::{0}].Properties[Value]']/ConfiguredValue"
fname = "config.dtsConfig"
xml = New Xml.XmlDocument()
xml.Load(fname)
xml.SelectSingleNode(String.Format(xpathTemplate, "myElement")).InnerText = "updated!"
xml.Save(fname)

Since i just wanted to update one field i used this method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜