USP_DATAFORMTEMPLATE_EDITLOAD_SITE

The load procedure used by the edit dataform template "Site Edit Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@NAME nvarchar(250) INOUT Name
@DESCRIPTION nvarchar(max) INOUT Description
@TSLONG bigint INOUT Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record.
@SHORTNAME nvarchar(100) INOUT Short name
@SITEID nvarchar(100) INOUT Site ID
@ACRONYM nvarchar(100) INOUT Acronym
@SITETYPECODEID uniqueidentifier INOUT Site type

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_SITE
                    (
                        @ID uniqueidentifier,
                        @DATALOADED bit = 0 output,
                        @NAME nvarchar(250) = null output,
                        @DESCRIPTION nvarchar(max) = null output,
                        @TSLONG bigint = 0 output,
                        @SHORTNAME nvarchar(100) = null output,
                        @SITEID nvarchar(100) = null output,
                        @ACRONYM nvarchar(100) = null output,
                        @SITETYPECODEID uniqueidentifier = null output
                    )
                    as
                        set nocount on;

                        -- be sure to set these, in case the select returns no rows

                        set @DATALOADED = 0
                        set @TSLONG = 0

                      select
                            @DATALOADED = 1,
                            @TSLONG = TSLONG,
                            @NAME = NAME,
                            @SHORTNAME = SHORTNAME,
                            @SITEID = SITEID,
                            @ACRONYM = ACRONYM,
                            @SITETYPECODEID = SITETYPECODEID,
                            @DESCRIPTION = DESCRIPTION
                        from
                            dbo.SITE
                        where
                            ID = @ID;

                        return 0;