Käynnissä

009 SQL Server Management Studio Addin (Stored Proc Setup)

We want an add-in for Microsoft SQL Server, which allows the user to select one of our stored procedures, and then puts the stored procedure into a new query ready for the user to enter whatever values they want fo the variables.

The add-in will convert a stored procedure declaration, for example:

CREATE PROCEDURE dbo.itsp_ProfileKeyManage @Overwrite bit, @KeyID int, @Name nvarchar(50) = '', @Formula nvarchar(4000) = '',

@OwnerID int = -1, @PassCode nvarchar(255) = '', @Public bit = 0, @RetAVal bit = 1

To:

DECLARE @Overwrite bit, @KeyID int, @Name nvarchar(50), @Formula nvarchar(4000),

@OwnerID int, @PassCode nvarchar(255), @Public bit, @RetAVal bit

SET @Overwrite =

SET @KeyID =

SET @Name = ''

SET @Formula = ''

SET @OwnerID = -1

SET @PassCode = ''

SET @Public = 0

SET @RetAVal = 1

This involves:

1) Provide dropdown listing all stored procedures in selected database

2) Changing CREATE PROCEDURE [procedure name] to DECLARE.

3) Removing default parameters from the DECLARE statement.

4) Adding a set command for each parameter on a separate line.

5) Set the defualt parameters from the declaration as defualt variables.

This must work with SQL Server Management Studio Express

This must obviously work with any stored procedure, not just this one.

Taidot: .NET, SQL, Visual Basic

Näytä lisää: to studio, add management studio, sql server management studio, ssms add, server studio, on sql, n studio, studio, stored, stored procedures, sql microsoft, sql c, server changing, proc, microsoft visual studio, microsoft sql server, microsoft server, int, database microsoft sql, dropdown select, sql statement stored, convert sql database, net addin, command line parameter, sql select

About the Employer:
( 13 reviews ) Hadliegh, United Kingdom

Projektin tunnus: #471260