随笔-196  评论-2242  文章-1  trackbacks-63

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

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控件中,应用程序端的调用代码是什么样的?

posted on 2006-08-14 15:29 min.jiang 阅读(5780) 评论(2) 编辑 收藏

评论:
#1楼 2006-08-14 18:59 | dudu      
请在提问区提问!
 回复 引用 查看   
#2楼 2006-08-16 02:09 | volnet
共同期待结果……
 回复 引用   
min的个人网站终于创建起来了
昵称:min.jiang
园龄:5年6个月
粉丝:138
关注:8
<2006年8月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

常用链接

最新随笔

随笔分类

随笔档案

Follow Me

博客园友情链接

拳皇比赛视频

积分与排名

  • 积分 - 492967
  • 排名 - 124

最新评论

阅读排行榜

评论排行榜

推荐排行榜