Solution - @@rowcount/@@error Problem 
Author Message
 Solution - @@rowcount/@@error Problem

It would appear that the problem that we discovered is not a Sybase Bug,
this is what is happening :-

        i) The Error is being caught by the Pre-Processing of the Proc
           when it is loaded into Cache. The Proc is not actually being
           executed at all and this is why 2 error messages are being
           displayed when the proc is exec'd on the command line.

        2) If however the insert had been performed using local variables
           rather than an absolute NULL then the error would have been
           detected at run-time (rather than load time) and our error
           handling would have worked.

Our problem was originally caused by adding a Non NULL column onto a
table and forgetting to reload a stored procedure. This combined with
our error checking mechanism caused us to corrupt 2 Days worth of processing.

Thanks to everybody that responded.


        Always remember to re-load all your stored procs when you change
        the structure of a table.

        Pretty Obvious Really.


Reply To

Fri, 11 Aug 1995 18:37:58 GMT
 [ 1 post ] 

 Relevant Pages 

1. problem with @@ROWCOUNT and @@ERROR

2. a problem about @@rowcount and @@error

3. Problem with @@rowcount/@@error on 4.01

4. Intermittent timeouts and/or general network error problems <--- Possible solution

5. Recordset error problem need solution


7. Capture @@error and @@rowcount from last tran

8. @@ERROR and @@ROWCOUNT ????

9. SQL 6.0/ 6.5 set rowcount @variable generates error

10. @@RowCount / @@Error

11. How to capture both @@error and @@rowcount?

12. Record @@error and @@rowcount from last tran

Powered by phpBB® Forum Software