USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTPRIMARYADDRESSCOUNTRY

The load procedure used by the view dataform template "Constituent Primary Address Country View 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.
@COUNTRYID uniqueidentifier INOUT Country ID

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_CONSTITUENTPRIMARYADDRESSCOUNTRY
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @COUNTRYID uniqueidentifier = null output
                )
                as
                    set nocount on;

                    set @DATALOADED = 0;

                    select 
                        @DATALOADED = 1,
                        @COUNTRYID = COUNTRYID
                    from 
                        dbo.ADDRESS
                    where 
                        ADDRESS.CONSTITUENTID = @ID
                        and ADDRESS.ISPRIMARY = 1;

                    return 0;