You are here: Re: SQL Server 2005 - Save tran save point name case sensitive? « MsSQL Server « IT news, forums, messages
Re: SQL Server 2005 - Save tran save point name case sensitive?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация