Read dtsConfig as XML

  • Hi,

    Sorry if this has been asked before, I have searched...

    My question is, using .NET in a Script Component, how do I load the XML from the dtsConfig into say, an XMLDocument/XmlTextReader.

    Ultimately I would like to read a specific value from the dtsConfig file.

    Many thanks for your help.

  • paul.r (8/24/2011)


    Ultimately I would like to read a specific value from the dtsConfig file.

    You should be using Package Configurations to read values from the dtsConfig file. Why re-invent the wheel?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • I have to completely agree.

    CEWII

  • Ok, thanks. That at least points me in the right direction.

    The value in the dtsConfig I'm attempting to read is not a custom/manually added key, but one that exists as a result of having created a DB connection string:

    <Configuration ConfiguredType="Property" Path="\Package.Connections[DevDB1DatabaseConnection].Properties[InitialCatalog]" ValueType="String">

    <ConfiguredValue>DevDB1</ConfiguredValue>

    </Configuration>

    Could you please provide some sample code of how I would read this value from a .NET Script Component?

    Thanks again,

    Paul.

  • No, I won't, sorry, you are STILL trying to re-invent the wheel. Add a variable at the package level and use the package configuration to set the variable, then all you have to do in the .Net code is read the already filled in variable.

    CEWII

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply