﻿CREATE PROCEDURE [dbo].[sp_DefaultPropertiesUpdateByName]
	-- Add the parameters for the stored procedure here
	@PropertyName nvarchar(255), 
	@DefaultValue nvarchar(255),
	@errorNumber int output,
	@errorMessage nvarchar(255) output
AS
BEGIN
	-- Insert statements for procedure here
	set @errorNumber = 0 
	set @errorMessage = space(0)

	SET NOCOUNT ON;
	BEGIN
		update [dbo].[DefaultProperties]
			set  [DefaultValue] = @DefaultValue
		where PropertyName = @PropertyName
	END
	IF(@@error!=0)
	BEGIN
		SET @errorNumber = error_number()
		SET @errorMessage = error_message()
	END
END;