dbo.QBM_PExecuteSQLMulti
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:01.820 · modified 2026-04-14T23:14:10.617 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@Statements | QBM_YCursorBuffer | no |
@HasDifferentGenprocID | bit | no |
@procid | int | no |
@LockTimeout_ms | int | no |
@MaxWaitTimeForLock_s | float | no |
@PrintDebug | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| QBM_PExecuteSQLWithRetry_LLP | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_PExecuteSQLMulti (@Statements QBM_YCursorBuffer readonly , @HasDifferentGenprocID bit = 0 , @procid int = 0 2 , @LockTimeout_ms int = 100 , @MaxWaitTimeForLock_s float = 1.5 , @PrintDebug bit = 0 ) as begin declare @ElementCount int declare @ElementIndex int 3declare @ElementBuffer QBM_YCursorBuffer declare @GenProcID varchar(38) declare @SQLCmd nvarchar(max) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext 4('') declare @GenProcID_old varchar(38) = @GenProcID_R declare @Erg int = 0 declare @Anzahl int = 0 declare @DebugSwitch int = 0 SET XACT_ABORT OFF BEGIN 5 TRY if @HasDifferentGenprocID = 1 begin if @DebugSwitch > 0 begin print 'differenzieren' end insert into @ElementBuffer (UID1, ContentFull) select isnull 6(s.UID1, @GenProcID_R), s.ContentFull from @Statements s order by isnull(s.UID1, @GenProcID_R), s.ElementIndex select @ElementCount = @@ROWCOUNT end else 7 begin if @DebugSwitch > 0 begin print 'alles mit der Genprocid ' + @GenProcID_R end insert into @ElementBuffer (UID1, ContentFull) select @GenProcID_R 8, s.ContentFull from @Statements s order by s.ElementIndex select @ElementCount = @@ROWCOUNT end select @ElementIndex = 1 while @ElementIndex <= @ElementCount 9 begin select top 1 @GenProcID = @GenProcID_old , @SQLCmd = bu.ContentFull from @ElementBuffer bu where bu.ElementIndex = @ElementIndex if @GenProcID <> 10 @GenProcID_old begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID select @GenProcID_old = @GenProcID if @DebugSwitch > 0 begin print 'Genprocid switched to ' 11 + @GenProcID end end if @DebugSwitch > 0 begin print @SQLcmd end exec @Anzahl = QBM_PExecuteSQLWithRetry_LLP @SQLStatement = @SQLcmd , @LockTimeout_ms 12 = @LockTimeout_ms , @MaxWaitTimeForLock_s = @MaxWaitTimeForLock_s , @ProcIDForJournal = @@PROCID , @HandleErrorSilent = 0 , @ExecuteWithTransact = 0 13if @Anzahl > 0 and @PrintDebug = 1 begin print 'rows affected with ' + str(@Anzahl) print @SQLcmd end select @Erg += @Anzahl select @ElementIndex += 1 14end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1 15) WITH NOWAIT END CATCH ende: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return (@erg) end 16
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:14:10.617
uses session context values has TRY/CATCH error handling
Summary: calls QBM_PSessionContextSet, QBM_PExecuteSQLWithRetry_LLP, QBM_PSessionErrorAdd; writes INSERT into; uses session context GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@Statements | qbm_ycursorbuffer | input |
@HasDifferentGenprocID | bit | input |
@procid | int | input |
@LockTimeout_ms | int | input |
@MaxWaitTimeForLock_s | float | input |
@PrintDebug | bit | input |
DML targets
INSERT intoRead/join references
None extracted.
SQL dependency metadata
Config/session
Config: None extracted.
Session: GenProcID
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @Statements @HasDifferentGenprocID @procid @LockTimeout_ms @MaxWaitTimeForLock_s @PrintDebug @ElementCount @ElementIndex @ElementBuffer @GenProcID @SQLCmd @GenProcID_R @GenProcID_old @Erg @Anzahl @DebugSwitch @ROWCOUNT @SQLcmd @SQLStatement @ProcIDForJournal @PROCID @HandleErrorSilent @ExecuteWithTransact @Rethrow @erg
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.QBM_P195C5572460EC8DDA27B3A3_1 | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PForeignKeyEmptySetNull | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PNonlinear_Prepare | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_PITShopBoardPrepareDelete | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_PITShopOrderMove_bulk | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_PITShopPersonHasObjFill_b | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_TDDynamicGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_TUDynamicGroup | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.RMS_TIESetHasEntitlement | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_P195C5572460EC8DDA27B3A3_1 | source text reference | has TRY/CATCH error handling |
| dbo.QBM_PForeignKeyEmptySetNull | source text reference | has TRY/CATCH error handling |
| dbo.QBM_PNonlinear_Prepare | source text reference | has TRY/CATCH error handling |
| dbo.QER_PITShopBoardPrepareDelete | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QER_PITShopOrderMove_bulk | source text reference | creates object-layer jobs via QBM_PJobCreate*, calls object-layer method via HOCallMethod, uses session context values, has TRY/CATCH error handling |
| dbo.QER_PITShopPersonHasObjFill_b | source text reference | has TRY/CATCH error handling |
| dbo.QER_TDDynamicGroup | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |
| dbo.QER_TUDynamicGroup | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |
| dbo.RMS_TIESetHasEntitlement | source text reference | inserts DBQueue tasks, uses session context values, has TRY/CATCH error handling |