USP_DATAFORMTEMPLATE_VIEW_PEOCMSAUTOLOG_TOKEN

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN
@DATALOADED bit INOUT
@USER nvarchar(50) INOUT

Definition

Copy

create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_PEOCMSAUTOLOG_TOKEN
(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @USER nvarchar(50) = null output
)
as
    set nocount on;

        -- be sure to set this, in case the select returns no rows
    set @DATALOADED = 1;

  declare @temp TABLE(BinaryData image, TextData ntext);  
 insert into @temp exec [dbo].[spTempDataFetch] @ID;  

 select @USER = Cast(TextData as nvarchar(50)) from @temp;  

  --remove token once we get the id so it will only get used once  
  delete from dbo.TempData where ID = @ID;  

  if @USER is null 
    set @USER = '';

    return 0;