USP_DATAFORMTEMPLATE_EDIT_HOUSEHOLD_PRELOAD
The load procedure used by the edit dataform template "Household 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(100) | INOUT | Name |
@DESCRIPTION | nvarchar(300) | INOUT | Description |
@WEBADDRESS | UDT_WEBADDRESS | INOUT | Website |
@GIVESANONYMOUSLY | bit | INOUT | Household gives anonymously |
@PICTURE | varbinary | INOUT | Image |
@PICTURETHUMBNAIL | varbinary | INOUT | Image thumbnail |
@PICTURECHANGED | bit | INOUT | Picture changed |
@HOUSEHOLDSCANBEDONORS | bit | INOUT | Households can be donors |
@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_EDIT_HOUSEHOLD_PRELOAD
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(300) = null output,
@WEBADDRESS dbo.UDT_WEBADDRESS = null output,
@GIVESANONYMOUSLY bit = null output,
@PICTURE varbinary(max) = null output,
@PICTURETHUMBNAIL varbinary(max) = null output,
@PICTURECHANGED bit = null output,
@HOUSEHOLDSCANBEDONORS bit = null output,
@TSLONG bigint = 0 output
)
as
set nocount on
select
@DATALOADED = 1,
@ID = C.ID,
@NAME = C.KEYNAME,
@DESCRIPTION = GD.DESCRIPTION,
@GIVESANONYMOUSLY = C.GIVESANONYMOUSLY,
@PICTURETHUMBNAIL = C.PICTURETHUMBNAIL,
@WEBADDRESS = C.WEBADDRESS,
@TSLONG = C.TSLONG
from
dbo.CONSTITUENT C
inner join dbo.GROUPDATA GD on C.ID = GD.ID
where
C.ID = @ID and
C.ISORGANIZATION = 0 and
C.ISGROUP = 1;
set @HOUSEHOLDSCANBEDONORS = dbo.UFN_INSTALLATIONINFO_GETHOUSEHOLDSCANBEDONORS()
return 0;