USP_DATAFORMTEMPLATE_EDITLOAD_MKTCONTACT
The load procedure used by the edit dataform template "Marketing Contact 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. |
@CONTACT_LASTNAME | nvarchar(100) | INOUT | Last name |
@CONTACT_FIRSTNAME | nvarchar(50) | INOUT | First name |
@CONTACT_MIDDLENAME | nvarchar(50) | INOUT | Middle name |
@CONTACT_TITLECODEID | uniqueidentifier | INOUT | Title |
@CONTACT_SUFFIXCODEID | uniqueidentifier | INOUT | Suffix |
@CONTACT_NICKNAME | nvarchar(50) | INOUT | Nickname |
@CONTACT_PICTURE | varbinary | INOUT | Picture |
@CONTACT_PICTURETHUMBNAIL | varbinary | INOUT | Picture thumbnail |
@CONTACT_PICTURECHANGED | bit | INOUT | Picture changed? |
@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. |
@CONTACT_TITLE2CODEID | uniqueidentifier | INOUT | Title 2 |
@CONTACT_SUFFIX2CODEID | uniqueidentifier | INOUT | Suffix 2 |
Definition
Copy
CREATE procedure dbo.[USP_DATAFORMTEMPLATE_EDITLOAD_MKTCONTACT]
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CONTACT_LASTNAME nvarchar(100) = null output,
@CONTACT_FIRSTNAME nvarchar(50) = null output,
@CONTACT_MIDDLENAME nvarchar(50) = null output,
@CONTACT_TITLECODEID uniqueidentifier = null output,
@CONTACT_SUFFIXCODEID uniqueidentifier = null output,
@CONTACT_NICKNAME nvarchar(50) = null output,
@CONTACT_PICTURE varbinary(max) = null output,
@CONTACT_PICTURETHUMBNAIL varbinary(max) = null output,
@CONTACT_PICTURECHANGED bit = null output,
@TSLONG bigint = 0 output,
@CONTACT_TITLE2CODEID uniqueidentifier = null output,
@CONTACT_SUFFIX2CODEID uniqueidentifier = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@CONTACT_LASTNAME = [CONSTITUENT].[KEYNAME],
@CONTACT_FIRSTNAME = [CONSTITUENT].[FIRSTNAME],
@CONTACT_MIDDLENAME = [CONSTITUENT].[MIDDLENAME],
@CONTACT_TITLECODEID = [CONSTITUENT].[TITLECODEID],
@CONTACT_SUFFIXCODEID = [CONSTITUENT].[SUFFIXCODEID],
@CONTACT_NICKNAME = [CONSTITUENT].[NICKNAME],
@CONTACT_PICTURETHUMBNAIL = [CONSTITUENT].[PICTURETHUMBNAIL],
@TSLONG = [CONSTITUENT].[TSLONG],
@CONTACT_TITLE2CODEID = [CONSTITUENT].[TITLE2CODEID],
@CONTACT_SUFFIX2CODEID = [CONSTITUENT].[SUFFIX2CODEID]
from dbo.[CONSTITUENT]
where [CONSTITUENT].[ID] = @ID;
set @CONTACT_PICTURECHANGED = 0;
return 0;