USP_SECUREGATEWAY_CREDENTIALS_ADD
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | INOUT | |
@NAME | nvarchar(500) | IN | |
@ACCESSKEY | nvarchar(200) | IN | |
@ENTITLEMENTTYPE | nvarchar(10) | IN |
Definition
Copy
CREATE procedure dbo.USP_SECUREGATEWAY_CREDENTIALS_ADD
(
@ID uniqueidentifier = null output,
@NAME nvarchar(500),
@ACCESSKEY nvarchar(200),
--Make optional for backwards compatibility
@ENTITLEMENTTYPE nvarchar(10) = ''
)
as
begin
if ((select count(1) from dbo.[SECUREGATEWAYCREDENTIALS]) > 0)
raiserror('Attempted to add credentials when one already exists', 13, 1);
-- Just call the new stored proc since this one only exists for backwards compatibility
begin try
exec dbo.USP_SECUREGATEWAY_CREDENTIALS_SET @ID output, @NAME=@NAME, @ACCESSKEY=@ACCESSKEY;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;
end