USP_DATAFORMTEMPLATE_VIEW_COURSECLASSLIMITS
The load procedure used by the view dataform template "Course Class Limits 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. |
@CLASSSIZEMINIMUM | smallint | INOUT | Minimum |
@CLASSSIZETARGET | smallint | INOUT | Target |
@CLASSSIZEMAXIMUM | nvarchar(10) | INOUT | Maximum |
@CLASSESPERTERMMINIMUM | smallint | INOUT | Minimum |
@CLASSESPERTERMTARGET | smallint | INOUT | Target |
@CLASSESPERTERMMAXIMUM | nvarchar(10) | INOUT | Maximum |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_COURSECLASSLIMITS
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CLASSSIZEMINIMUM smallint = null output,
@CLASSSIZETARGET smallint = null output,
@CLASSSIZEMAXIMUM nvarchar(10) = null output,
@CLASSESPERTERMMINIMUM smallint = null output,
@CLASSESPERTERMTARGET smallint = null output,
@CLASSESPERTERMMAXIMUM 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,
@CLASSSIZEMINIMUM = CLASSSIZEMINIMUM,
@CLASSSIZETARGET = CLASSSIZETARGET,
@CLASSSIZEMAXIMUM = case when CLASSSIZEMAXIMUM = 0 then null else Cast(CLASSSIZEMAXIMUM as varchar(10)) end,
@CLASSESPERTERMMINIMUM = CLASSESPERTERMMINIMUM,
@CLASSESPERTERMTARGET = CLASSESPERTERMTARGET,
@CLASSESPERTERMMAXIMUM = case when CLASSESPERTERMMAXIMUM = 0 then null else Cast(CLASSESPERTERMMAXIMUM as varchar(10)) end
from dbo.COURSE
where ID = @ID
return 0;