USP_DATAFORMTEMPLATE_EDITLOAD_SURVEYRESPONSE

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

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@SURVEYRESPONSES xml INOUT Responses
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@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_SURVEYRESPONSE
                    (
                        @ID uniqueidentifier,
                        @SURVEYRESPONSES xml = null output,
                        @DATALOADED bit = 0 output,
                        @TSLONG bigint = 0 output
                    )
                    as
                        set nocount on;

                        set @DATALOADED = 0;
                        set @TSLONG = 0;

                        begin try
                            select
                                @DATALOADED = 1,
                                @TSLONG = SURVEY.TSLONG,                                
                                @SURVEYRESPONSES = dbo.UFN_SURVEYRESPONSE_GETRESPONSES_TOITEMLISTXML(@ID)
                            from
                                dbo.SURVEY
                            where
                                SURVEY.ID = @ID;
                        end try
                        begin catch
                            exec dbo.USP_RAISE_ERROR;
                            return 1;
                        end catch

                        return 0;