Set Conn = Server.CreateObject("ADODB.Connection")
' The following line must be changed to reflect your data source info
Conn.Open "data source name", "user id", "password"
set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = Conn
' Specify the name of the stored procedure you wish to call
cmd.CommandText = "sp_MyStoredProc"
cmd.CommandType = adCmdStoredProc
' Query the server for what the parameters are
cmd.Parameters.Refresh
%>
<Table Border=1>
<TR>
<TD><B>PARAMETER NAME</B></TD>
<TD><B>DATA-TYPE</B></TD>
<TD><B>DIRECTION</B></TD>
<TD><B>DATA-SIZE</B></TD>
</TR>
<% For Each param In cmd.Parameters %>
<TR>
<TD><%= param.name %></TD>
<TD><%= param.type %></TD>
<TD><%= param.direction %></TD>
<TD><%= param.size %></TD>
</TR>
<%
Next
Conn.Close
%>
</TABLE>
Comments