Viewing stored procedure in a window forms control from management studio
Is there away to show the actually stored procedure from SQL management studio in windows application, Basically I pulling information from a specific database from a server, and then showing the user whats going on. Now that I am pulling information. I want to give the user the ability to look at an read only view inside some type of windows control, is there away. if so how do you open an stored from the database itself and view it.
SenthilkumarPosted Apr 8, 2012, 1:03 PM
SenthilkumarPosted Apr 8, 2012, 8:59 PM
Yes! you are right!!.
It will give the actual stored procedure text. You can show it in the multiline text box as well.
The Proc_SplitWordsToChar is the actual stored procedure name. Similarly when user click on any stored procedure name, you can pass it as parameter in the query. But the underlying database should be correct.
David SmithPosted Apr 8, 2012, 1:34 PM
Say for instance if I have a stored procedures that says
CREATE PROCEDURE sp_GetInventory
@location varchar(10)
AS
SELECT Product, Quantity
FROM Inventory
WHERE Warehouse = @location
Will the output display the text below. I am basically trying to display this stored procedure in a control, when I query from database
CREATE PROCEDURE sp_GetInventory
@location varchar(10)
AS
SELECT Product, Quantity
FROM Inventory
WHERE Warehouse = @location