Re: Ignore SQL Server 2000 store proc errors and still get results?



Do you have control over the stored procedures? The optimal way to
handle server-side errors in this situation would be to NOT use
raiserror and instead return the expected @@error values in output
parameters instead. That way you can decide in your client-side code
whether or not to ignore the output parameter values without
triggering an exception. Raising errors and handling exceptions is
expensive in both server and client code.

--Mary

On Wed, 10 Aug 2005 14:39:30 -0400, "Mike Jansen"
<mjansen_nntp@xxxxxxxx> wrote:

>We have a SQL Server 2000 stored procedure that raises errors when run.
>Because of what it is doing, this is expected. However, we have result sets
>that are also being returned from the stored procedure.
>
>Using either DataAdapter or SqlDataReader, we'd like to be able to execute
>the stored proc and still get the result sets back. However, exceptions are
>thrown whenever the stored proc raises an error. Is there any way to ignore
>or suppress these errors and still get the result sets?
>
>Thanks,
>Mike
>

.



Relevant Pages

  • Re: Throw DbConcurrencyException?
    ... return an output parameter value ... it this way in the stored procedure, you avoid throwing exceptions ... both on the server and the client, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL/ADO (2.8) Timeout Error - Cant resolve
    ... > Server 2000 back end. ... > timeout limit. ... And I’ve used SQL Query Analyzer to run the ... I am running a stored procedure that will backup a SQL Server ...
    (microsoft.public.sqlserver.clients)
  • Re: How to test a custom conflict resolver procedure
    ... once I set my stored procedure as a custom resolver? ... Here is an example of a custom resolver I wrote which might help you ... --creating the stored procedure conflict resolver ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.replication)
  • Re: quality of service
    ... company that hosts my company's web site and connected SQL Server database. ... The same stored procedure is called from a number of different web pages ... The company that hosts my web site and connected SQL ... this clustering is indicative of slowed or failed SQL Server responses due ...
    (microsoft.public.sqlserver.server)
  • Re: Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parame
    ... The @RowV Values when it reaches the stored procedure on SQL server always gets reset to 0x00 No matter what value I set it to. ... I am using timestamps to determine if the row has been updated on the server before I apply the new updates. ... @ProviderID smallint, ... @RowOut timestamp OUTPUT ...
    (microsoft.public.dotnet.framework.adonet)

Loading