05 Running Stored Procedures In Active Table Editor

Let users enter parameters and run approved stored procedures from Active Table Editor.

Active Table Editor
4.9 ★★★★★ Based on 16 reviews on Capterra See all reviews on Capterra →

Use this pattern when a user needs to run a database-side calculation or reporting preparation step.

What You Will Learn

  • Create a simple parameter table for user input.
  • Connect a stored procedure to an Active Table Editor action.
  • Run approved SQL-side work from the user interface.
  • Keep complex database operations away from direct manual execution.

Before You Start

Use a development database for the demo script and review stored procedure permissions before giving users access.

Demo Script

CREATE TABLE [dbo].[calculation_parameters](
[start_date] [datetime] NOT NULL,
[end_date] [datetime] NULL
) ON [PRIMARY]

GO

CREATE PROCEDURE [dbo].[p_Calculate]
(
@start_date datetime,
@end_date datetime
)
AS
begin
set nocount on
end
GO

set nocount on
declare @start_date datetime;
declare @end_date datetime;

select @start_date=max(start_date) from calculation_parameters;
select @end_date=max(end_date) from calculation_parameters;

exec p_Calculate @start_date, @end_date

Need The Product First?

Download the Active Table Editor trial before following the tutorial, or review the product page if you are still comparing options.