how to create a script to execute a package? RRS feed

  • Question

  • hello,

    I am loading data from one DB to another. I wish to load them every day at night. I know  to do that, I must write a script. But how to do it? I don't know. Could someone help me?

    thanks in advance

    jeudi 10 mai 2007 13:20

Toutes les réponses

  • hi , I think this example (VB.Net) can help you:

    Code Snippet

    Dim pkgLocation As String
            Dim pkg As Package
            Dim app As Microsoft.SqlServer.Dts.Runtime.Application
            Dim pkgResults As DTSExecResult
            pkgLocation = "C:\test.dtsx"
            app = New Microsoft.SqlServer.Dts.Runtime.Application()
            pkg = app.LoadPackage(pkgLocation, Nothing)
            pkgResults = pkg.Execute()

    mardi 15 mai 2007 11:21