USP_DATAFORMTEMPLATE_VIEW_DESIGNATIONNAME

The load procedure used by the view dataform template "Designation Names 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.
@NAME nvarchar(512) INOUT Name
@VANITYNAME nvarchar(512) INOUT Vanity name

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_DESIGNATIONNAME
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @NAME nvarchar(512) = null output,
    @VANITYNAME nvarchar(512) = null output
)
as
    set nocount on;

    -- be sure to set this, in case the select returns no rows

    set @DATALOADED = 0;

    select
        @DATALOADED = 1,
        @NAME = dbo.UFN_DESIGNATION_GETNAME(@ID),
        @VANITYNAME = VANITYNAME
    from dbo.DESIGNATION
    where ID = @ID;

    return 0;