Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
I would like to display the selected stored procedure information not executing or some other kind. I will have my list of stored procedures displayed on the form where the user can select the required and if click on Generate button i would like to display the text of that stored procedure as it is on the web form
Sample Image
http://i.imgur.com/1143X.png[^]
Posted

You can use the following statement in ur command string:

exec sp_helptext Mystoredproc

----------------------------------

and display it in a textbox or a label
 
Share this answer
 
Comments
demouser743 16-Mar-11 5:00am    
Thanks Raj
Raj.rcr 16-Mar-11 6:22am    
My pleasure.. Cheers..!
Dalek Dave 16-Mar-11 5:17am    
Don't know why that got down voted.
Yonghao Chen 16-Mar-11 5:46am    
Thanks. This helped me too.
This will help you,
exec sp_helptext @storproc = 'stored_procedure_name'
 
Share this answer
 
v3
Comments
Dalek Dave 16-Mar-11 5:17am    
Good call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900