dbo.QBM_PDialogColumnInsert

SQL_STORED_PROCEDURE

Created 2025-06-27T17:57:28.817 · modified 2026-04-14T23:20:25.460 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@TableNamenvarcharno
@GenProcIDvarcharno
@ModuleNamevarcharno

Referenced objects

SchemaObjectColumn/minorClass
dialogcolumnOBJECT_OR_COLUMN
DialogTableOBJECT_OR_COLUMN
QBM_PJournalOBJECT_OR_COLUMN
QBM_PSessionContextSetOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
dboQBM_FCVElementToObjectKey1OBJECT_OR_COLUMN
dboQBM_FGIDBOwnerOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN
dboQBM_FGIUID_DialogColumnOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1    create   procedure QBM_PDialogColumnInsert( @TableName nvarchar(64), @GenProcID varchar(38) = '' , @ModuleName varchar(3) = '' ) as begin   
2 declare @Columnname nvarchar(64) declare @uid_dialogColumn varchar(38) declare @msg nvarchar(1000) declare @XUser nvarchar(64) declare @XDate datetime
3 declare @SchemaDatatype nvarchar(256) declare @SchemaDatalen int declare @uid_dialogTable varchar(38) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext
4('') declare @XUser_R nvarchar(64) = dbo.QBM_FGISessionContext('XUser')  declare @DebugSwitch int = 0 declare @DebugLevel char(1) = 'W' declare @ElementBuffer
5 QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN TRY if isnull(@GenProcID, '') = '' begin select @GenProcID
6 = @GenProcID_R end if isnull(@ModuleName, '') = '' begin select @ModuleName = dbo.QBM_FGIDBOwner() end select @XUser = @XUser_R select @Xdate = getUTCDate
7() select top 1 @uid_dialogTable = t.UID_DialogTable from DialogTable t where t.TableName = @TableName if @DebugSwitch > 0 begin print '@uid_dialogTable'
8 + @uid_dialogTable select ic.Column_name, ic.DATA_TYPE, ic.CHARACTER_MAXIMUM_LENGTH from information_schema.columns ic left outer join ( select c.ColumnName
9, t.TableName from dialogcolumn c join DialogTable t on c.UID_DialogTable = t.UID_DialogTable ) as x on x.TableName = ic.TABLE_NAME and x.ColumnName = 
10ic.COLUMN_NAME where x.TableName is null and ic.table_name = @TableName end insert into @ElementBuffer (Ident1, Ident2, Int1) select ic.Column_name, ic.DATA_TYPE
11, ic.CHARACTER_MAXIMUM_LENGTH from information_schema.columns ic left outer join ( select c.ColumnName, t.TableName from dialogcolumn c join DialogTable
12 t on c.UID_DialogTable = t.UID_DialogTable ) as x on x.TableName = ic.TABLE_NAME and x.ColumnName = ic.COLUMN_NAME where x.TableName is null and ic.table_name
13 = @TableName select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @Columnname = bu.Ident1
14 , @SchemaDatatype = bu.Ident2 , @SchemaDatalen = bu.Int1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex select @msg = N'Column in DialogColumn inserted : '
15 + @TableName + N'.' + @Columnname if @DebugSwitch > 0 begin print isnull(@msg, 'Column in DialogColumn inserted' ) end exec QBM_PJournal @msg, @@PROCID
16, 'I', @DebugLevel   select @uid_dialogColumn = dbo.QBM_FGIUID_DialogColumn (@TableName, @Columnname, @ModuleName) exec QBM_PSessionContextSet 'GenProcID'
17, @GenProcID exec QBM_PSessionContextSet 'XUser', @XUser insert into dialogcolumn (UID_DialogColumn, uid_dialogtable, columnname, XObjectKey , xdateinserted
18, xdateupdated, xuserinserted, xuserupdated , SchemaDataType, SchemaDatalen , Caption ) select @uid_dialogColumn, @uid_dialogTable, @Columnname, dbo.QBM_FCVElementToObjectKey1
19('DialogColumn', 'UID_DialogColumn', @uid_dialogColumn) , @Xdate, @Xdate, @XUser, @XUser ,@SchemaDatatype, @SchemaDatalen , @Columnname select @ElementIndex
20 += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow,
21 18, 1) WITH NOWAIT END CATCH  ende: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R exec QBM_PSessionContextSet 'XUser', @XUser_R return end 
22

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:20:25.460

uses session context values has TRY/CATCH error handling

Summary: calls QBM_PJournal, QBM_PSessionContextSet, QBM_PSessionErrorAdd; writes INSERT into, INSERT dialogcolumn; reads/joins DialogTable, information_schema, dialogcolumn; uses session context XUser, GenProcID

Declared parameters

ParameterTypeDirection
@TableNamenvarchar(64)input
@GenProcIDvarchar(38)input
@ModuleNamevarchar(3)input

DML targets

INSERT into INSERT dialogcolumn

Config/session

Config: None extracted.

Session: XUser GenProcID

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @TableName @GenProcID @ModuleName @Columnname @uid_dialogColumn @msg @XUser @XDate @SchemaDatatype @SchemaDatalen @uid_dialogTable @GenProcID_R @XUser_R @DebugSwitch @DebugLevel @ElementBuffer @ElementCount @ElementIndex @Xdate @ROWCOUNT @PROCID @Rethrow

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 objectRelationEvidence
dbo.QBM_PViewBuildP_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildR_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildU_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildV_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildP_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildR_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildU_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildV_internsource text referencehas TRY/CATCH error handling