Return to Snippet

Revision: 29899
at August 5, 2010 01:18 by RealRover


Initial Code
BEGIN TRY

	/* Code here */

	DECLARE @UserGroupId INT	
	INSERT INTO UserGroup (RoleId, ScopeGroupId)
		VALUES (5555, 7777)
	SET @UserGroupId = SCOPE_IDENTITY()
	IF @UserGroupId IS NULL
		RAISERROR('User group creation failed', 16, 1)

END TRY
BEGIN CATCH
	SELECT ERROR_MESSAGE() AS Error
END CATCH

Initial URL

                                

Initial Description

                                

Initial Title
TRY - RAISERROR - CATCH

Initial Tags

                                

Initial Language
SQL