USP_DATAFORMTEMPLATE_VIEW_ADVOCACYGROUP
The load procedure used by the view dataform template "AdvocacyGroup 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. |
@GROUPID | smallint | INOUT | Groupid |
@TYPEID | smallint | INOUT | Typeid |
@NAME | nvarchar(100) | INOUT | Name |
@DISTRICT | nvarchar(10) | INOUT | District |
@COUNTRY | nvarchar(10) | INOUT | Country |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_ADVOCACYGROUP
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@GROUPID smallint = null output,
@TYPEID smallint = null output,
@NAME nvarchar(100) = null output,
@DISTRICT nvarchar(10) = null output,
@COUNTRY nvarchar(10) = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 0;
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message.
select @DATALOADED = 1,
@GROUPID = GROUPID,
@TYPEID = TYPEID,
@NAME = NAME,
@DISTRICT = DISTRICT,
@COUNTRY = COUNTRY
from dbo.ADVOCACY_GROUP
where ID = @ID
return 0;