有时在连接超时后,存储过程中的事务并不能回滚.FAINT....这个可向谁请教呢?

解决方案 »

  1.   

    晕微软自己都说SQL不可靠.CAUSE
    In some situations, error handling in a Transact-SQL batch or a stored procedure by using @@ERROR is not possible. After the error occurs, the Transact-SQL batch or the stored procedure is aborted, all uncommitted transactions are not rolled back, and the execution of the statements stops. Because of this behavior in SQL Server, it is not possible to handle all kinds of errors by using @@ERROR in a Transact-SQL batch or a stored procedure.
    Back to the topWORKAROUND
    To work around this problem, you can do one of the following:• Handle the errors at the client application. 
    • Handle the errors outside the Transact-SQL batch or the stored procedure. 
      

  2.   

    只用事务,不用@ERROR什么意思呀?
    如果你用SET XACT_ABORT ON
    就更不可靠了,可能有一些错误这个根本捕获不到.
      

  3.   

    靠,总的来说只有一点.SQL的事务处理不可靠.需要你在代码层手动处理.郁闷呀!!!!!!!!!!