熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

關於ASP.NET2.0編寫擴展存儲過程

2022-06-13   來源: .NET編程 
    SqlPipe 類
  C# 復制代碼
  [MicrosoftSqlServerServerSqlProcedure()]
  public static void StoredProcExecuteCommand(int rating)
  {
   // Connect through the context connection
   using (SqlConnection connection = new SqlConnection(context connection=true))
   {
   connectionOpen();
  
   SqlCommand command = new SqlCommand(
   SELECT VendorID AccountNumber Name FROM PurchasingVendor +
   WHERE CreditRating <= @rating connection);
   commandParametersAddWithValue(@rating rating);
  
   // Execute the command and send the results directly to the client
   SqlContextPipeExecuteAndSend(command);
  
   }
  以上存儲過程的執行結果怎麼樣在ASPNET應用程序端來調用?
  如果想把以上存儲過程的返回結果體現在DataList控件中應用程序端的調用代碼是什麼樣的?
  
  ;
From:http://tw.wingwit.com/Article/program/net/201311/12644.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.