当前位置:首页 > 网络编程 > WEB编程 > ASP.net >  关于ASP.NET2.0编写扩展存储过程的问题

 关于ASP.NET2.0编写扩展存储过程的问题

点击次数:30 次 发布日期:2008-11-26 12:40:27 作者:源代码网
源代码网推荐      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
源代码网推荐  
源代码网推荐  
源代码网推荐  
源代码网推荐    做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。
源代码网推荐


源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华