Skip to main content

Determining how to properly call a stored procedure


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

Popular posts from this blog

Web synchronization option for merge replication

http://msdn2.microsoft.com/en-us/library/ms151319.aspx SQL Server 2005 Books Online Implementing Replication over the Internet Replicating data over the Internet allows remote, disconnected users to access data when they need it using a connection to the Internet. Replicate data over the Internet using: A Virtual Private Network (VPN). For more information, see Publishing Data over the Internet Using VPN . The Web synchronization option for merge replication. For more information, see Web Synchronization for Merge Replication . All types of Microsoft SQL Server replication can replicate data over a VPN, but you should consider Web synchronization if you are using merge replication.

Request Signatures in Blackberry

Request Signatures in Blackberry need copy sigtool.db, sigtool.csk to SDK/component/Bin folder for example V 4.2.1 ../eclipse\plugins\net.rim.eide.componentpack4.2.1_4.2.1.17\components\bin