我想实现一个存储过程分页显示.并且在asp.net中调用此存储过程.不知道该怎么写代码?
  有没有知道的.帮下忙!

解决方案 »

  1.   

    存储过程的代码与数据库语言是差不多的,只不过在条件那里where ID=@ID
      

  2.   

    调用存储过程和SQL语句是差不多的。就只是指定SqlCommand对象的CommandType不同而已
      

  3.   

    http://topic.csdn.net/u/20091204/21/722689e1-7824-497c-b709-4b1118264633.html
      

  4.   

    create proc usp_AllowPage   --usp_AllowPage 为存储过程名;
    @pageindex int,                --为页的索引即第几页;
    @pagesize int,         --为每页是多少条数据
    @Count int output        --返回数量;
    as
    select * from (select row_number() over(order by m_datetime desc) as newids,*from message) as newstable where newids between @pagesize*(@pageindex-1)+1 and @pagesize*@pageindex 
    select @Count= count(*) from Message    --Message为表明