随笔-137  评论-1674  文章-1  trackbacks-63

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 姜敏 阅读(5446) 评论(2)  编辑 收藏 所属分类: ASP.NET2.0

评论:
#1楼 2006-08-14 18:59 | dudu      
请在提问区提问!
  回复  引用  查看    
#2楼 2006-08-16 02:09 | volnet
共同期待结果……
  回复  引用    



发表评论

昵称: [登录] [注册]

主页:

邮箱:(仅博主可见)

评论内容:

  登录  注册

[使用Ctrl+Enter键快速提交评论]

0 476478




相关文章:

相关链接: