tags:

views:

18

answers:

0

Hi All,

I am trying to execute my SSIS packages from VB.NET 2005. Actually, this application was written in Vb.NET 2003 and was runnign the DTS packages programmatically. Since we recently migrated all our DTS packages into SSIS packages, we are now suppose to migrate the .NET application to VS.NET 2005 so that we could refer to Microsoft.SqlServer.Dts.Runtime which is a 2.0 assembly.

After making the necessary code changes, I am still not able to run the package as the package.Execute is failing. Also, I am not able to find what's the exact error message and don't know how to check. If possible please suggest how to handle package execution events.

Below is the code sample:-

    Dim pkg As New Package
    Dim app As New Application
    Dim pkgResults As DTSExecResult

        strSSISPackageName = "\\" & strSSISPackageName

        pkg = app.LoadFromSqlServer(strSSISPackageName, server, uid, pwd, Nothing)
        pkgResults = pkg.Execute()

Please let me know why pkg.Execute fails.

Thanks in advance, Suresh