How to call a package from sql or .net

  • Can someone tell me how to invoke a package? And how to pass a value into a package scope variable?

    Where do these pachages go?

     

    erik

    Dam again!

  • You can see your packages logging on to Integration services from SQL Server 2005 Management console. You can keep them in file server as well. 

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

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

    execPkg = execApp.LoadFromSqlServer("Your Package location"","pkgServer", "pkgUser","pkgPassword", Nothing)

    execPkg.Variables("Pkgvariable1").Value = varvalue1

    execPkg.Variables("Pkgvariable2").Value = varvalue2

    execPkg.Execute()

    execPkg =

    Nothing

    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