SSIS Package

  • I need change the source property from a ssis package from my .net application?

    Anyone knows?

    I have this code:

    Dim pkgLocation As String

    Dim pkg As Microsoft.SqlServer.Dts.Runtime.Package

    Dim app As New Microsoft.SqlServer.Dts.Runtime.Application

    Dim pkgResults As Microsoft.SqlServer.Dts.Runtime.DTSExecResult

    pkgLocation = "C:\Documents and Settings\msantero\Escritorio\Tarea Analyzer a SQL 2005\Proyectos Analysis Services\Proyecto de Integration Services1\Proyecto de Integration Services1\bin\Package1.dtsx" ' path del package a ejecutar

    'app = New Microsoft.SqlServer.Dts.Runtime.Application()

    pkg = app.LoadPackage(pkgLocation, "")

    pkgResults = pkg.Execute()

    I need something like:

    pkg.source = "my string"

    but not exist

    thanks

    Mark

  • I did something similar where I could change the source of the file dynamically. I basically added a variable to the package called FilePath then in the DataFlow I selected the Connection to my file source in the Connection Managers. Add an Expression Set the property of the expression to be of type connection string. In the expression set the add @[User::FilePath].

    Now you could pass the connection string to the package:

    pkgIn.Variables["FilePath"].Value = "Your connection string source"

    I hope this helps

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

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