dbo.QBM_PSessionErrorSave
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FCVIntToString source text reference
- references source dbo.QBM_FCVSessionErrorToMVP source text reference
- references source dbo.QBM_FCVStringPadLeft source text reference
- references source dbo.QBM_PSessionContextSet source text reference
Complete Source
1CREATE PROCEDURE QBM_PSessionErrorSave(2 @AllSessionErrors QBM_YSessionError READONLY3)4AS5BEGIN6 DECLARE @MessageKey varchar(30)7 DECLARE @LastMessage varchar(8000)8 DECLARE @OneSessionError QBM_YSessionError9 DECLARE @ElementCount int10 DECLARE @ElementIndex int11 DECLARE @LastElement int12 SET XACT_ABORT OFF13 SET nocount14 ON15 SELECT @ElementCount = COUNT(*)16 FROM @AllSessionErrors17 SELECT @ElementIndex = min(e.ElementIndex)18 FROM @AllSessionErrors e19 SELECT @LastElement = @ElementIndex + @ElementCount - 120 WHILE @ElementIndex <= @LastElement21 BEGIN22 SELECT23 @MessageKey = CONCAT('ErrorMessage',24 dbo.QBM_FCVStringPadLeft(dbo.QBM_FCVIntToString(@ElementIndex), 3, '0'))25 DELETE @OneSessionError26 INSERT INTO @OneSessionError(ErrorMessage,27 ErrorSeverity,28 ErrorState,29 ErrorNumber,30 ProcedureName,31 ProcedureLine,32 MessageDate,33 GenProcID,34 RepeatCounter,35 IsReThrow,36 SourceCode)37 SELECT38 ErrorMessage,39 ErrorSeverity,40 ErrorState,41 ErrorNumber,42 ProcedureName,43 ProcedureLine,44 MessageDate,45 GenProcID,46 RepeatCounter,47 IsReThrow,48 SourceCode49 FROM @AllSessionErrors e50 WHERE51 e.ElementIndex = @ElementIndex52 SELECT @LastMessage = dbo.QBM_FCVSessionErrorToMVP(@OneSessionError)53 EXEC QBM_PSessionContextSet @MessageKey,54 @LastMessage55 SELECT @ElementIndex += 156 END57 SELECT58 @MessageKey = CONCAT('ErrorMessage',59 dbo.QBM_FCVStringPadLeft(dbo.QBM_FCVIntToString(@ElementIndex), 3, '0'))60 EXEC QBM_PSessionContextSet @MessageKey,61 ''62END
Open raw exported source
1 create procedure QBM_PSessionErrorSave (@AllSessionErrors QBM_YSessionError readonly ) as begin declare @MessageKey varchar(30) declare @LastMessage2 varchar(8000) declare @OneSessionError QBM_YSessionError Declare @ElementCount int declare @ElementIndex int declare @LastElement int SET XACT_ABORT OFF3 set nocount on select @ElementCount = COUNT(*) from @AllSessionErrors select @ElementIndex = min(e.ElementIndex) from @AllSessionErrors e select @LastElement4 = @ElementIndex + @ElementCount - 1 while @ElementIndex <= @LastElement begin select @MessageKey = CONCAT('ErrorMessage', dbo.QBM_FCVStringPadLeft( dbo.QBM_FCVIntToString5(@ElementIndex), 3, '0') ) delete @OneSessionError insert into @OneSessionError(ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber , ProcedureName, 6ProcedureLine, MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode) select ErrorMessage, ErrorSeverity, ErrorState, ErrorNumber , ProcedureName7, ProcedureLine, MessageDate , GenProcID, RepeatCounter, IsReThrow, SourceCode from @AllSessionErrors e where e.ElementIndex = @ElementIndex select @LastMessage8 = dbo.QBM_FCVSessionErrorToMVP(@OneSessionError) exec QBM_PSessionContextSet @MessageKey, @LastMessage select @ElementIndex += 1 end select @MessageKey9 = CONCAT('ErrorMessage', dbo.QBM_FCVStringPadLeft( dbo.QBM_FCVIntToString(@ElementIndex), 3, '0') ) exec QBM_PSessionContextSet @MessageKey, '' end 10