USP_DATAFORMTEMPLATE_EDITSAVE_MAPINSTANCE

The save procedure used by the edit dataform template "Map Instance Edit Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter indicating the ID of the record being edited.
@NAME nvarchar(100) IN Name
@DESCRIPTION nvarchar(1000) IN Description
@MAPCATEGORYCODEID uniqueidentifier IN Category
@MAPINSTANCEXML xml IN Map instance XML
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITSAVE_MAPINSTANCE(
                        @ID uniqueidentifier,
                        @NAME nvarchar(100),
                        @DESCRIPTION nvarchar(1000),
                        @MAPCATEGORYCODEID uniqueidentifier,
                        @MAPINSTANCEXML xml,
                        @CHANGEAGENTID uniqueidentifier = null)
                    as
                        set nocount on;

                        if @CHANGEAGENTID is null  
                            exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;

                        update dbo.MAPINSTANCE set NAME = @NAME,
                            DESCRIPTION = @DESCRIPTION,
                            MAPCATEGORYCODEID = @MAPCATEGORYCODEID,
                            MAPINSTANCEXML = @MAPINSTANCEXML,
                            CHANGEDBYID = @CHANGEAGENTID,
                            DATECHANGED = getdate()
                        where ID = @ID;