• λ我爱Aspx >> Asp.Net >> 存储过程分页
  • 存储过程分页

  • :未知  Դ:internet  :2007-5-20 16:44:46  ؼ:
  • sql+= order by dbo.ApplyJob.sendtime DESC;

    string sql1=Select Count(1) FROM dbo.ApplyJob RIGHT OUTER JOIN dbo.BaseInfo ON dbo.ApplyJob.rid = dbo.BaseInfo.id left join jobinfo on ApplyJob.jobid=jobinfo.id where dbo.ApplyJob.JobId in (+positionid+) and ApplyJob.ApplyState='0' and Iflow='0' ;

    sda.SelectCommand.Parameters[DataAccess.DbCFG.QueryStr_Parm].Value = sql ;

    sda.SelectCommand.Parameters[DataAccess.DbCFG.Sql_Parm].Value = sql1 ;

    sda.SelectCommand.Parameters[DataAccess.DbCFG.PageSize_Parm].Value = pagesize;

    sda.SelectCommand.Parameters[DataAccess.DbCFG.PageCurrent_Parm].Value = PageCurrent ;

    sda.Fill(ds) ;

    //data=ds.Tables[1];

    return ds ;

    }

    private SqlCommand SelectCommand ;

    public static string P_Show = P_Show; // 分页使用的存储过程名称

    public static string QueryStr_Parm = @QueryStr ; // 向分页存储过程里传入的 Sql 语句

    Ҷƪл˵?
  • һƪSQL Server 索引结构及其使用(一)
    һƪSQL在存储过程中使用递归