Sqlpipe class
C # copyCode
[Microsoft. sqlserver. server. sqlprocedure ()]
Public static void storedprocexecutecommand (INT rating)
{
// Connect through the context connection.
Using (sqlconnection connection = new sqlconnection ("context connection = true "))
{
Connection. open ();
Sqlcommand command = new sqlcommand (
"Select vendorid, accountnumber, name from purchasing. Vendor" +
"Where creditrating <= @ rating", connection );
Command. Parameters. addwithvalue ("@ rating", rating );
// execute the command and send the results directly to the client.
sqlcontext. pipe. executeandsend (command);
}< br> How is the execution result of the above Stored Procedure stored in ASP. is the net2.0 application Program called?
If You Want To embody the returned results of the above stored procedure in the datalist control, what is the calling code of the application?