USP_DATAFORMTEMPLATE_VIEW_BUSINESSPROCESSSCHEDULE_LASTRUN

Parameters

Parameter Parameter Type Mode Description
@DATALOADED bit INOUT
@LASTRUNTIME datetimeoffset INOUT

Definition

Copy

create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_BUSINESSPROCESSSCHEDULE_LASTRUN
(
    @DATALOADED bit = 0 output,
    @LASTRUNTIME datetimeoffset(3) = null output
)
as
    set nocount on;

    -- be sure to set these, 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.  Also note that we fetch the TSLONG so that concurrency
    -- can be considered.
    select top 1
        @DATALOADED = 1,
        @LASTRUNTIME = LASTRUNTIME        
    from dbo.BUSINESSPROCESSSCHEDULELASTRUN

    return 0;