|
Posted by xAvailx on 02/12/06 19:16
Thanks for your time, Erland.
I checked the server and database collations. On both we are using the
English (US) default collation SQL_Latin1_General_CP1_CI_AS which
should be case insensitive.
I tried your sample code, and it worked as advertised. However, as soon
as I wrapped it in Try / Catch block, then I get the error in my
original post. Note that if I change, "Rollback Tran LOCALTRAN" to
"Rollback Tran localtran" I don't get any errors.
/* START SNIPPET */
Create Database dbCSTest Collate SQL_Latin1_General_CP1_CI_AS
Go
Use dbCSTest
Go
Create Procedure dbo.TestSaveTran
As
Begin
Begin Tran localtran
Begin Try
--Simulate Error While Processing
RAISERROR('Something bad happened', 16, 1)
End Try
Begin Catch
--Rollback to save point
Rollback Tran LOCALTRAN --<< NOTE case change
End Catch
End
Go
--Execute Stored Proc
Exec dbo.TestSaveTran
Go
Use Master
Drop Database dbCSTest
/* END SNIPPET */
Navigation:
[Reply to this message]
|