SqlPipe 類
C# 復制代碼
[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);
}
以上存儲過程的執行結果怎麼樣在ASP.Net2.0應用程序端來調用?
如果想把以上存儲過程的返回結果體現在DataList控件中,應用程序端的調用代碼是什麼樣的?
http://www.cnblogs.com/ASPNET2008/archive/2006/08/14/476478.Html