spCustomFormEntryAttribute_AddUpdate
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @EntryID | uniqueidentifier | INOUT | |
| @AttributeType | int | INOUT | |
| @AttributeValue | ntext | IN | |
| @ChangeDate | datetime | IN | |
| @ChangeUserID | int | IN |
Definition
Copy
CREATE procedure [dbo].[spCustomFormEntryAttribute_AddUpdate]
(
@EntryID uniqueidentifier output,
@AttributeType int output,
@AttributeValue ntext,
@ChangeDate datetime,
@ChangeUserID int
)
as
begin transaction
update dbo.CustomFormEntryAttribute set
[EntryID] = @EntryID,
[AttributeType] = @AttributeType,
[AttributeValue] = @AttributeValue,
[ChangeDate] = @ChangeDate,
[ChangeUserID] = @ChangeUserID
where [EntryID] = @EntryID and [AttributeType] = @AttributeType
if @@rowcount = 0
begin
insert into dbo.CustomFormEntryAttribute
(
EntryID,
AttributeType,
AttributeValue,
ChangeDate,
ChangeUserID
)
values
(
@EntryID,
@AttributeType,
@AttributeValue,
@ChangeDate,
@ChangeUserID
)
end
commit transaction