USP_DATAFORMTEMPLATE_EDITLOAD_USAGEREPORTPARAMETERS

The load procedure used by the edit dataform template "Application Usage Report Process Parameter Edit"

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.
@STARTDATE datetime INOUT Start date
@DATAKEY varbinary INOUT DATAKEY
@APPUSERKEY varbinary INOUT APPUSERKEY
@COMPONENTKEY varbinary INOUT COMPONENTKEY
@DEFINITIONKEY varbinary INOUT DEFINITIONKEY
@PUBLICKEY nvarchar(250) INOUT PUBLICKEY
@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.

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_USAGEREPORTPARAMETERS
                    (
                        @ID uniqueidentifier,
                        @DATALOADED bit = 0 output,
                        @STARTDATE datetime = null output,
                        @DATAKEY varbinary(max) = null output,
                        @APPUSERKEY varbinary(max) = null output,
                        @COMPONENTKEY varbinary(max) = null output,
                        @DEFINITIONKEY varbinary(max) = null output,
                        @PUBLICKEY nvarchar(250) = null output,
                        @TSLONG bigint = 0 output
                    )
                    as                
                        set NOCOUNT on;

                        set @DATALOADED = 0
                        set @TSLONG = 0

                        select top 1
                            @DATALOADED = 1,
                            @STARTDATE = USAGEREPORTPROCESS.STARTDATE,
                            @DATAKEY = DATAKEY,
                            @APPUSERKEY = APPUSERKEY,
                            @COMPONENTKEY = COMPONENTKEY,
                            @DEFINITIONKEY = DEFINITIONKEY,
                            @PUBLICKEY = PUBLICKEY,
                            @TSLONG = USAGEREPORTPROCESS.TSLONG
                        from
                            dbo.USAGEREPORTPROCESS
                        order by
                            USAGEREPORTPROCESS.DATEADDED

                        return 0;