When I want to get the definition of a stored procedure
(in SQL Server) I use SQL Server Management Studio.
I sometimes run the `sp_helptext' to output the definition of a stored procedure.
Link: https://msdn.microsoft.com/en-us/library/ms176112.aspx
In a nutshell, I'd like to have a simple html popup window that would output any stored procedure's definition to text.
The asp code below is making a successful connection to my Database, but I'm not getting any output.
<%
' .......
sql = "exec sp_helptext 'some_ProcName_Here'"
objRs.open sql, objConn
Text=objRs("Text")
response.write(Text)
%>
I also attempted creating a new Stored Procedure that takes 1 parameter, which would execute the sp_helptext
.
<%
' .......
sql = "exec See_Proc_Definition @ProcName=some_ProcName_Here"
objRs.open sql, objConn
Text=objRs("Text")
response.write(Text)
%>
Neither of these display anything, but I don't get any returned errors neither. Can anyone see what I'm doing wrong?