declare @localv int
begin tran
select top 10 * from articles
raiserror('error raised here',16,1)
select @localv = @@error
rollback tran
print @localv
On 2月9日, 下午2时38分, "Bob" wrote:
> Hi all,
>
> In SQL 2005, is it possible to rollback the entire transaction but
> save/keep the system generated error message/error severity
> information some where? I tried to store the error message in local
> memory but once rollback I lost it.
>
> Any ideas would be highly appreciated.
>
> Thanks. >> Stay informed about: Rollback whole transaction save/keep error message/error s..