SoftadminGuide.Generate_Grid_DynamicSql

Type: Stored procedure

Creates the dynamic sql procedure for a Grid menuitem.
Expects the temp tables

CREATE TABLE #SelectColumns
(
	ColumnName sysname NOT NULL,
	SortOrder int NULL
);

(optional)
CREATE TABLE #WhereColumns
(
	ColumnName sysname NOT NULL,
	DataType nvarchar(160) NOT NULL,
	SortOrder int NULL
);

The tables may be created from SoftadminGuide.Table_AllColumns or SoftadminGuide.ParseField_Columns (assuming it does not involve any joins). See the documentation of those functions for further explaination of the columns.

Parameters

@OverwriteProcedure mandatory bit
Whether or not it is allowed to overwrite an existing procedure.
@ProcedureName mandatory varchar(600)
Name of the created procedure.
@TableName mandatory nvarchar(600)
Name of the table to base the procedure on.