欢迎光临
我们一直在努力

关于ASP.NET2.0编写扩展存储过程的问题-.NET教程,Asp.Net开发

建站超值云服务器,限时71元/月

 

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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 关于ASP.NET2.0编写扩展存储过程的问题-.NET教程,Asp.Net开发
分享到: 更多 (0)

相关推荐

  • 暂无文章