USP_DATAFORMTEMPLATE_EDITLOAD_ACKNOWLEDGEMENTPREFERENCE

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

Parameters

Parameter Parameter Type Mode Description
@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.
@REACKNOWLEDGEREVENUE bit INOUT Re-acknowledge revenue

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_ACKNOWLEDGEMENTPREFERENCE
                    (
                        @DATALOADED bit = 0 output,
                        @TSLONG bigint = 0 output,
                        @REACKNOWLEDGEREVENUE bit = null output
                    )
                    as
                        set nocount on;

                        set @DATALOADED = 0
                        set @TSLONG = 0

                        if (select count(ID) from dbo.ACKNOWLEDGEMENTPREFERENCE) = 0 
                        begin
                            select 
                                @REACKNOWLEDGEREVENUE = 0,
                                @DATALOADED = 1
                        end
                        else
                        begin
                            select top 1
                                @REACKNOWLEDGEREVENUE = REACKNOWLEDGEREVENUE,
                                @DATALOADED = 1,
                                @TSLONG = TSLONG
                            from 
                                dbo.ACKNOWLEDGEMENTPREFERENCE;
                        end

                        return 0;