Raiserror within a SQL Exec Task

  • Hello SSISers,

    I would like to retrieve the error message raised by the T-SQL Raiserror() within SSIS.

    Here's a example of what I would like to do:

    Create procedure sp_test

    As

    Begin

    Raiserror('Custom error message', 16, 1)

    End

    Go

    In SSIS I have a Exec. SQL task that run the previous stored procedure.

    When I execute the package, the task fail as expected but the error retreived by the OnError event is:

    Executing the query "EXEC procedure sp_test" failed with the following error: "Exception from HRESULT: 0x80040E14". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Is there a way to retrieve the 'custom error message' message instead of the « Exception from HRESULT : 0x80040E14 » message ?

    Thanks in advance,

    Patrick

    edit: translated the error msg

  • Please translate it to english.

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

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