有时在连接超时后,存储过程中的事务并不能回滚.FAINT....这个可向谁请教呢?
解决方案 »
- 外部表不是预期的格式
- 不能删除表中记录,在线等解决方法
- 跪求 SQL 语句 !!
- 求一简单sql
- SQL2000,导数据表时如何把默认值,主键一起导过去?
- 一个表是复合主键(5个字段),现在表出重复数据
- 关于两表合并的问题
- 菜鸟问大虾:在SQL SERVER中怎样在建表时,可以把一个字段的值赋给另外一个字段初值吗?如果可以请问怎样赋值?
- 在SQL 中可以写函数自已调用吗 ??例如:select *,aa(dd) as dd from table 其中函数 aa( ) 是有返回值的 !!
- 大家帮我看看这个存储过程
- 比较难的问题--》怎么获取联合查询语句得出的记录集的字段???明早给分
- 比较两条SQL的执行效率
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.
如果你用SET XACT_ABORT ON
就更不可靠了,可能有一些错误这个根本捕获不到.