M
Mart via .NET 247
(Type your message here)
I am calling an sp from ADO.NET, and almost everything is fine. The ADO.Net code has a try catch block for SqlException.The sp calls another sp, which may call RAISERROR under acertain condition. When this happens the top level sp reads thecode returned to it and carries out appropriate action -however, this does not prevent the SQLException (generated bythe lower level sp) firing in the ADO.NET code when the upper spreturns to it.
Is it possible to reset the exception/RAISEERROR in the top levelsp, to prevent the ADO.NET SqlException firing.
Note that removing the RAISEERROR from the lower level sp is notan option, as this sp is required to be called direct fromADO.NET code elsewhere in the program.
Thoughts please.
I am calling an sp from ADO.NET, and almost everything is fine. The ADO.Net code has a try catch block for SqlException.The sp calls another sp, which may call RAISERROR under acertain condition. When this happens the top level sp reads thecode returned to it and carries out appropriate action -however, this does not prevent the SQLException (generated bythe lower level sp) firing in the ADO.NET code when the upper spreturns to it.
Is it possible to reset the exception/RAISEERROR in the top levelsp, to prevent the ADO.NET SqlException firing.
Note that removing the RAISEERROR from the lower level sp is notan option, as this sp is required to be called direct fromADO.NET code elsewhere in the program.
Thoughts please.