Click here to Skip to main content
15,070,974 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
Dim app As Application = New Application()
        Dim package As Package = Nothing
        Dim IsSucceed As Boolean = False
        '//Load the SSIS Package which will be executed
        package = app.LoadPackage("E:\UploadFinacle\New_Updt_Cust_Accnt_Upload.dtsx", Nothing)
        '//P/ass the varibles into SSIS Package
        package.Variables("User::BrCode").Value = branchcode
        'package.PackagePassword = "1234"
        '//Execute the SSIS Package and store the Execution Result       


        Dim results As Microsoft.SqlServer.Dts.Runtime.DTSExecResult = package.Execute()
        '//Check the results for Failure and Success        
        If results = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure Then
            Dim err As String = ""
            Dim local_DtsError As Microsoft.SqlServer.Dts.Runtime.DtsError
            For Each local_DtsError In package.Errors
                Dim aa As String = local_DtsError.Description.ToString()
                err = err + aa
            Next
        End If

        If results = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success Then
            'Dim message As String = "Package Executed Successfully...."
            IsSucceed = True
        End If
        'You can also return the error or Execution Result
        Return IsSucceed 

SOurce Connectionstring
Data Source=172.16.92.2;User ID=sa;Initial Catalog=OBC_MISDB;Provider=SQLNCLI10.1;Persist Security Info=True;
Application Name=SSIS-Cust_Accnt_Upload-{3FA5EE92-674B-46AF-A0B8-FC62BC85CE23}OBC MISDB;

DEstination Connectionstring

Data Source=UATFIN;User ID=misdata;Provider=MSDAORA.1;Persist Security Info=True;




THIS PACKAGE RUN SUCCESFULLY When I call With sqlserver store Procedure But when i call through .net then got error

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Cannot open database "OBC_MISDB" requested by the login. The login failed.".
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "OBC MISDB" failed with error code 0xC0202009.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.
One or more component failed validation.
There were errors during task validation.

Please Help
Thanks
Posted
Updated 8-Jan-14 0:28am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900