asp.net SQL Server 存储过程分页及代码调用 .htm 159 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <!-- saved from url=(0053)http://blog.csdn.net/zdw_wym/article/details/30974033 -->
  3. <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <script type="text/javascript" async="" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ga.js"></script><script id="allmobilize" charset="utf-8" src="./asp.net SQL Server 存储过程分页及代码调用 _files/allmobilize.min.js"></script><style type="text/css"></style>
  5. <meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" media="handheld" href="http://blog.csdn.net/zdw_wym/article/details/30974033#">
  6. <title>asp.net SQL Server 存储过程分页及代码调用 - 少壮不努力,老大做IT
  7. - 博客频道 - CSDN.NET</title>
  8. <meta name="description" content="1、创建存储过程,如CREATE PROC P_viewPage    @TableName VARCHAR(200),     --表名    @FieldList VARCHAR(2000),    --显示列名,如果是全部字段则为*    @PrimaryKey VARCHAR(100),    --单一主键或唯一值键    @Where VARCHAR(2000),        --查询">
  9. <script src="./asp.net SQL Server 存储过程分页及代码调用 _files/jquery.js" type="text/javascript"></script>
  10. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ad.js"></script>
  11. <!--new top-->
  12. <link rel="stylesheet" href="http://static.csdn.net/public/common/toolbar/css/index.css">
  13. <!--new top-->
  14. <link rel="Stylesheet" type="text/css" href="./asp.net SQL Server 存储过程分页及代码调用 _files/style.css">
  15. <link id="RSSLink" title="RSS" type="application/rss+xml" rel="alternate" href="http://blog.csdn.net/taomanman/rss/list">
  16. <link rel="shortcut icon" href="http://csdnimg.cn/public/favicon.ico">
  17. <link type="text/css" rel="stylesheet" href="./asp.net SQL Server 存储过程分页及代码调用 _files/default.css">
  18. <script src="./asp.net SQL Server 存储过程分页及代码调用 _files/share.js"></script><script type="text/javascript" charset="utf-8" src="./asp.net SQL Server 存储过程分页及代码调用 _files/tracking.js"></script><script type="text/javascript" charset="utf-8" src="./asp.net SQL Server 存储过程分页及代码调用 _files/main.js"></script><link rel="stylesheet" type="text/css" href="./asp.net SQL Server 存储过程分页及代码调用 _files/style(1).css"><link type="text/css" rel="stylesheet" href="./asp.net SQL Server 存储过程分页及代码调用 _files/style(2).css"><script src="./asp.net SQL Server 存储过程分页及代码调用 _files/logger.js"></script><link href="./asp.net SQL Server 存储过程分页及代码调用 _files/bdsstyle.css" rel="stylesheet" type="text/css"><link rel="stylesheet" href="http://bdimg.share.baidu.com/static/api/css/share_style0_16.css?v=89a7173d.css"></head>
  19. <body><iframe frameborder="0" style="display: none;"></iframe>
  20. <!--new top-->
  21. <script id="toolbar-tpl-scriptId" fixed="true" prod="blog" skin="black" src="./asp.net SQL Server 存储过程分页及代码调用 _files/html.js" type="text/javascript"></script><div class="csdn-toolbar csdn-toolbar-skin-black "> <div class="container row center-block "> <div class="col-md-3 pull-left logo clearfix"><a href="http://www.csdn.net/?ref=toolbar" title="CSDN首页" target="_blank" class="icon"></a><a title="频道首页" href="http://blog.csdn.net/?ref=toolbar_logo" target="_blank" class="img blog-icon"></a></div> <div class="pull-right login-wrap unlogin"> <ul class="btns"> <li class="loginlink"><a href="https://passport.csdn.net/account/login?ref=toolbar" target="_top">登录&nbsp;</a>|<a target="_top" href="https://passport.csdn.net/account/register?ref=toolbar">&nbsp;注册</a></li> <li class="search"> <div class="icon on-search-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <form action="http://so.csdn.net/search" method="get" target="_blank"> <input type="hidden" value="toolbar" name="ref" accesskey="2"> <div class="border"> <input placeholder="搜索" type="text" value="" name="q" accesskey="2"><span class="icon-enter-sm"></span> </div> </form> </div> </div> </li> <li class="favor"> <div class="icon on-favor-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div style="display:none;" class="favor-success"><span class="msg">收藏成功</span> <div class="btns"><span class="btn btn-primary ok">确定</span></div> </div> <div style="display:none;" class="favor-failed"><span class="icon-danger-lg"></span><span class="msg">收藏失败,请重新收藏</span> <div class="btns"><span class="btn btn-primary ok">确定</span></div> </div> <form role="form" class="form-horizontal favor-form"> <div class="form-group"> <div class="clearfix"> <label for="input-title" class="col-sm-2 control-label">标题</label> <div class="col-sm-10"> <input id="inputTitle" type="text" placeholder="" class="title form-control"> </div> </div> <div class="alert alert-danger"><strong></strong>标题不能为空</div> </div> <div class="form-group"> <label for="input-url" class="col-sm-2 control-label">网址</label> <div class="col-sm-10"> <input id="input-url" type="text" placeholder="" class="url form-control"> </div> </div> <div class="form-group"> <label for="input-tag" class="col-sm-2 tag control-label">标签</label> <div class="col-sm-10"> <input id="input-tag" type="text" class="form-control tag"> </div> </div> <div class="form-group"> <label for="input-description" class="description col-sm-2 control-label">摘要</label> <div class="col-sm-10"> <textarea id="input-description" class="form-control description"></textarea> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10 ft"> <div class="col-sm-4 pull-left"> <div class="checkbox"> <label> <input type="checkbox" name="share" checked="checked" class="share">公开 </label> </div> </div> <div class="col-sm-8 pull-right favor-btns"> <button type="button" class="cancel btn btn-default">取消</button> <button type="submit" class="submit btn btn-primary">收藏</button> </div> </div> </div> </form> </div> </div> </li> <li class="notify"> <div style="display:none" class="number"></div> <div style="display:none" class="icon-hasnotes-sm"></div> <div id="header_notice_num"></div> <div class="icon on-notify-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div id="note1" class="csdn_note"> <div class="box"></div> <iframe src="about:block" frameborder="0" allowtransparency="true" style="z-index:-1;position:absolute;top:0;left:0;width:100%;height:100%;background:transparent"></iframe></div> </div> </div> </li> <li class="ugc"> <div class="icon on-ugc-icon"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <dl> <dt><a href="http://geek.csdn.net/news/expert?ref=toolbar" target="_blank" class="p-news clearfix"><em class="icon"></em><span>分享资讯</span></a></dt> <dt><a href="http://share.csdn.net/slides/new?ref=toolbar" target="_blank" class="p-doc clearfix"><em class="icon"></em><span>传PPT/文档</span></a></dt> <dt><a href="http://bbs.csdn.net/topics/new?ref=toolbar" target="_blank" class="p-ask clearfix"><em class="icon"></em><span>提问题</span></a></dt> <dt><a href="http://write.blog.csdn.net/postedit?ref=toolbar" target="_blank" class="p-blog clearfix"><em class="icon"></em><span>写博客</span></a></dt> <dt><a href="http://u.download.csdn.net/upload?ref=toolbar" target="_blank" class="p-src clearfix"><em class="icon"></em><span>传资源</span></a></dt> <dt><a href="https://code.csdn.net/projects/new?ref=toolbar" target="_blank" class="c-obj clearfix"><em class="icon"></em><span>创建项目</span></a></dt> <dt><a href="https://code.csdn.net/snippets/new?ref=toolbar" target="_blank" class="c-code clearfix"><em class="icon"></em><span>创建代码片</span></a></dt> </dl> </div> </div> </li> <li class="profile"> <div class="icon on-profile-icon"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/100x100.jpg" class="curr-icon-img"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div class="bd"> <dl class="clearfix"> <dt class="pull-left img"><a target="_blank" href="http://my.csdn.net/?ref=toolbar" class="avatar"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/100x100.jpg"></a></dt> <dd class="info"><a target="_blank" href="http://my.csdn.net/?ref=toolbar" class="nickname"></a><a class="set-nick" href="https://passport.csdn.net/account/profile">设置昵称<span class="write-icon"></span></a><span class="dec"><a class="fill-dec" href="http://my.csdn.net/" target="_blank">编辑自我介绍,让更多人了解你<span class="write-icon"></span></a></span></dd> </dl> </div> <div class="ft clearfix"><a target="_blank" href="http://my.csdn.net/my/account/changepwd?ref=toolbar" class="pull-left"><span class="icon-cog"></span>帐号设置</a><a href="https://passport.csdn.net/account/logout?ref=toolbar" target="_top" class="pull-right "><span class="icon-signout"></span><span class="out">退出</span></a></div> </div> </div> </li> <li class="apps"> <div class="icon on-apps-icon"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div class="detail"> <dl> <dt> <h5>社区</h5> </dt> <dd> <a href="http://blog.csdn.net/?ref=toolbar" target="_blank">博客</a></dd> <dd> <a href="http://bbs.csdn.net/?ref=toolbar" target="_blank">论坛</a></dd> <dd> <a href="http://download.csdn.net/?ref=toolbar" target="_blank">下载</a></dd> <dd><a href="http://share.csdn.net/?ref=toolbar" target="_blank">Share</a></dd> <dd><a href="http://geek.csdn.net/?ref=toolbar" target="_blank">极客头条</a></dd> </dl> </div> <div class="detail"> <dl> <dt> <h5>服务</h5> </dt> <dd> <a href="https://code.csdn.net/?ref=toolbar" target="_blank">CODE</a></dd> <dd> <a href="http://hero.csdn.net/?ref=toolbar" target="_blank">英雄会</a></dd> <dd> <a href="http://huiyi.csdn.net/?ref=toolbar" target="_blank">活动</a></dd> <dd> <a href="http://www.csto.com/?ref=toolbar" target="_blank">CSTO</a></dd> </dl> </div> <div class="detail last"> <dl> <dt> <h5>俱乐部</h5> </dt> <dd> <a href="http://cto.csdn.net/?ref=toolbar" target="_blank">CTO俱乐部</a></dd> <dd> <a href="http://student.csdn.net/?ref=toolbar" target="_blank">高校俱乐部</a></dd> </dl> </div> </div> </div> </li> </ul> </div> </div> </div>
  22. <!--new top-->
  23. <div id="container">
  24. <div id="header">
  25. <div class="header">
  26. <div id="blog_title">
  27. <h2>
  28. <a href="http://blog.csdn.net/zdw_wym">少壮不努力,老大做IT</a></h2>
  29. <h3>专注.NET开发,涉及Silverlight、WPF、ArcGIS、Android、Windows Phone等技术开发!</h3>
  30. <div class="clear">
  31. </div>
  32. </div>
  33. <div class="clear">
  34. </div>
  35. </div>
  36. </div>
  37. <div id="navigator">
  38. <div class="navigator_bg">
  39. </div>
  40. <div class="navigator">
  41. <ul>
  42. <li id="btnContents"><a href="http://blog.csdn.net/zdw_wym?viewmode=contents"><span onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_mulu&#39;])">
  43. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_list.gif">目录视图</span></a></li>
  44. <li id="btnView"><a href="http://blog.csdn.net/zdw_wym?viewmode=list"><span onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_zhaiyao&#39;])">
  45. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_summary.gif">摘要视图</span></a></li>
  46. <li id="btnRss"><a href="http://blog.csdn.net/zdw_wym/rss/list"><span onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_RSS&#39;])">
  47. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_rss.gif">订阅</span></a></li>
  48. </ul>
  49. </div>
  50. </div>
  51. <script type="text/javascript">
  52. var username = "taomanman";
  53. var _blogger = username;
  54. var blog_address = "http://blog.csdn.net/zdw_wym";
  55. var static_host = "http://static.blog.csdn.net";
  56. var currentUserName = "";
  57. </script>
  58. <div id="body">
  59. <div id="main">
  60. <div class="main">
  61. <div class="ad_class">
  62. <div class="notice tracking-ad" data-mod="popu_3">
  63. <a href="http://bbs.csdn.net/topics/390812950?page=2#post-398116601" target="_blank">
  64. <font color="blue">博客专家福利
  65. </font></a>
  66. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  67. <a href="http://bbs.csdn.net/topics/390863850" target="_blank">
  68. <font color="red">【限时活动】建专辑得大奖</font></a>
  69. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  70. <a href="http://www.csdn.net/article/2014-09-10/2821606" target="_blank">
  71. <font color="blue">专访荣浩:流程的永恒之道
  72. </font></a>
  73. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  74. <a href="http://blog.csdn.net/blogdevteam/article/details/38657235" target="_blank"><font color="red">当青春遇上互联网,能否点燃你的创业梦
  75. </font></a>
  76. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  77. <a href="http://blog.csdn.net/blogdevteam/article/details/38418263" target="_blank">
  78. <font color="blue">推荐有礼--找出您心中的技术大牛
  79. </font></a>
  80. </div> </div>
  81. <link href="./asp.net SQL Server 存储过程分页及代码调用 _files/comment1.css" type="text/css" rel="stylesheet">
  82. <link href="./asp.net SQL Server 存储过程分页及代码调用 _files/style1.css" type="text/css" rel="stylesheet">
  83. <script language="JavaScript" type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/jquery.cookie.js"></script>
  84. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/main(1).js"></script>
  85. <div id="article_details" class="details">
  86. <div class="article_title">
  87. <span class="ico ico_type_Original"></span>
  88. <h1>
  89. <span class="link_title"><a href="./asp.net SQL Server 存储过程分页及代码调用 _files/asp.net SQL Server 存储过程分页及代码调用 .htm">
  90. asp.net SQL Server 存储过程分页及代码调用
  91. </a></span>
  92. </h1>
  93. </div>
  94. <div class="article_manage">
  95. <span class="link_categories">
  96. 分类:
  97. <a href="http://blog.csdn.net/taomanman/article/category/571993" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_fenlei&#39;]);">C#.NET编程</a>
  98. </span>
  99. <span class="link_postdate">2014-06-15 10:53</span>
  100. <span class="link_view" title="阅读次数">103人阅读</span>
  101. <span class="link_comments" title="评论次数"><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#comments" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_pinglun&#39;])">评论</a>(0)</span>
  102. <span class="link_collect"><a href="javascript:void(0);" onclick="javascript:_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_shoucang&#39;]);collectArticle(&#39;asp.net SQL Server 存储过程分页及代码调用&#39;,&#39;30974033&#39;);return false;" title="收藏">收藏</a></span>
  103. <span class="link_report"><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#report" onclick="javascript:_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_jubao&#39;]);report(30974033,2);return false;" title="举报">举报</a></span>
  104. </div>
  105. <div id="article_content" class="article_content">
  106. <span style="font-size:14px;">1、创建存储过程,语句如下:<br><br></span><div class="dp-highlighter bg_sql"><div class="bar"><div class="tools"><b>[sql]</b> <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="ViewSource" title="view plain" onclick="dp.sh.Toolbar.Command(&#39;ViewSource&#39;,this);return false;">view plain</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="CopyToClipboard" title="copy" onclick="dp.sh.Toolbar.Command(&#39;CopyToClipboard&#39;,this);return false;">copy</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="PrintSource" title="print" onclick="dp.sh.Toolbar.Command(&#39;PrintSource&#39;,this);return false;">print</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="About" title="?" onclick="dp.sh.Toolbar.Command(&#39;About&#39;,this);return false;">?</a><a href="https://code.csdn.net/snippets/393176" target="_blank" title="在CODE上查看代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="position:relative;top:1px;left:2px;"></a><a href="https://code.csdn.net/snippets/393176/fork" target="_blank" title="派生到我的代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="position:relative;top:2px;left:2px;"></a><div style="position: absolute; left: 428px; top: 488px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_1" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_1" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=18&amp;height=18" wmode="transparent"></div></div></div><ol start="1" class="dp-sql"><li class="alt"><span><span class="keyword">CREATE</span><span>&nbsp;PROC&nbsp;P_viewPage&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@TableName&nbsp;<span class="keyword">VARCHAR</span><span>(200),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--表名</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;@FieldList&nbsp;<span class="keyword">VARCHAR</span><span>(2000),&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--显示列名,如果是全部字段则为*</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@PrimaryKey&nbsp;<span class="keyword">VARCHAR</span><span>(100),&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--单一主键或唯一值键</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;@<span class="keyword">Where</span><span>&nbsp;</span><span class="keyword">VARCHAR</span><span>(2000),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--查询条件&nbsp;不含'where'字符,如id&gt;10&nbsp;and&nbsp;len(userid)&gt;9</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@<span class="keyword">Order</span><span>&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--排序&nbsp;不含'order&nbsp;by'字符,如id&nbsp;asc,userid&nbsp;desc,必须指定asc或desc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">--注意当@SortType=3时生效,记住一定要在最后加上主键,否则会让你比较郁闷</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@SortType&nbsp;<span class="keyword">INT</span><span>,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--排序规则&nbsp;1:正序asc&nbsp;2:倒序desc&nbsp;3:多列排序方法</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;@RecorderCount&nbsp;<span class="keyword">INT</span><span>,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--记录总数&nbsp;0:会返回总记录</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@PageSize&nbsp;<span class="keyword">INT</span><span>,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--每页输出的记录数</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;@PageIndex&nbsp;<span class="keyword">INT</span><span>,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--当前页数</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;@TotalCount&nbsp;<span class="keyword">INT</span><span>&nbsp;</span><span class="keyword">OUTPUT</span><span>,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">--记返回总记录</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;@TotalPageCount&nbsp;<span class="keyword">INT</span><span>&nbsp;</span><span class="keyword">OUTPUT</span><span>&nbsp;&nbsp;&nbsp;</span><span class="comment">--返回总页数</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span><span class="keyword">AS</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;NOCOUNT&nbsp;</span><span class="keyword">ON</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;<span class="func">ISNULL</span><span>(@TotalCount,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;</span><span class="keyword">SET</span><span>&nbsp;@TotalCount&nbsp;=&nbsp;0&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;=&nbsp;RTRIM(LTRIM(@</span><span class="keyword">Order</span><span>))&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@PrimaryKey&nbsp;=&nbsp;RTRIM(LTRIM(@PrimaryKey))&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@FieldList&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(RTRIM(LTRIM(@FieldList)),</span><span class="string">'&nbsp;'</span><span>,</span><span class="string">''</span><span>)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;WHILE&nbsp;CHARINDEX(<span class="string">',&nbsp;'</span><span>,@</span><span class="keyword">Order</span><span>)&nbsp;&gt;&nbsp;0&nbsp;</span><span class="op">OR</span><span>&nbsp;CHARINDEX(</span><span class="string">'&nbsp;,'</span><span>,@</span><span class="keyword">Order</span><span>)&nbsp;&gt;&nbsp;0&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(@</span><span class="keyword">Order</span><span>,</span><span class="string">',&nbsp;'</span><span>,</span><span class="string">','</span><span>)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(@</span><span class="keyword">Order</span><span>,</span><span class="string">'&nbsp;,'</span><span>,</span><span class="string">','</span><span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;<span class="func">ISNULL</span><span>(@TableName,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;</span><span class="op">OR</span><span>&nbsp;</span><span class="func">ISNULL</span><span>(@FieldList,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="op">OR</span><span>&nbsp;</span><span class="func">ISNULL</span><span>(@PrimaryKey,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="op">OR</span><span>&nbsp;@SortType&nbsp;&lt;&nbsp;1&nbsp;</span><span class="op">OR</span><span>&nbsp;@SortType&nbsp;&gt;3&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="op">OR</span><span>&nbsp;@RecorderCount&nbsp;&nbsp;&lt;&nbsp;0&nbsp;</span><span class="op">OR</span><span>&nbsp;@PageSize&nbsp;&lt;&nbsp;0&nbsp;</span><span class="op">OR</span><span>&nbsp;@PageIndex&nbsp;&lt;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRINT(<span class="string">'ERR_00'</span><span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">RETURN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;3&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;(<span class="func">UPPER</span><span>(</span><span class="func">RIGHT</span><span>(@</span><span class="keyword">Order</span><span>,4))!=</span><span class="string">'&nbsp;ASC'</span><span>&nbsp;</span><span class="op">AND</span><span>&nbsp;</span><span class="func">UPPER</span><span>(</span><span class="func">RIGHT</span><span>(@</span><span class="keyword">Order</span><span>,5))!=</span><span class="string">'&nbsp;DESC'</span><span>)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;PRINT(</span><span class="string">'ERR_02'</span><span>)&nbsp;</span><span class="keyword">RETURN</span><span>&nbsp;</span><span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@new_where1&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@new_where2&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@new_order1&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@new_order2&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@new_order3&nbsp;</span><span class="keyword">VARCHAR</span><span>(1000)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@Sql&nbsp;</span><span class="keyword">VARCHAR</span><span>(8000)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">DECLARE</span><span>&nbsp;@SqlCount&nbsp;NVARCHAR(4000)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;<span class="func">ISNULL</span><span>(@</span><span class="keyword">where</span><span>,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_where1&nbsp;=&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_where2&nbsp;=&nbsp;</span><span class="string">'&nbsp;WHERE&nbsp;&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_where1&nbsp;=&nbsp;</span><span class="string">'&nbsp;WHERE&nbsp;'</span><span>&nbsp;+&nbsp;@</span><span class="keyword">where</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_where2&nbsp;=&nbsp;</span><span class="string">'&nbsp;WHERE&nbsp;'</span><span>&nbsp;+&nbsp;@</span><span class="keyword">where</span><span>&nbsp;+&nbsp;</span><span class="string">'&nbsp;AND&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;<span class="func">ISNULL</span><span>(@</span><span class="keyword">order</span><span>,</span><span class="string">''</span><span>)&nbsp;=&nbsp;</span><span class="string">''</span><span>&nbsp;</span><span class="op">OR</span><span>&nbsp;@SortType&nbsp;=&nbsp;1&nbsp;&nbsp;</span><span class="op">OR</span><span>&nbsp;@SortType&nbsp;=&nbsp;2&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;1&nbsp;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order1&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">'&nbsp;ASC'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">'&nbsp;DESC'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;2&nbsp;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order1&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">'&nbsp;DESC'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">'&nbsp;ASC'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order1&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;3&nbsp;<span class="op">AND</span><span>&nbsp;&nbsp;CHARINDEX(</span><span class="string">','</span><span>+@PrimaryKey+</span><span class="string">'&nbsp;'</span><span>,</span><span class="string">','</span><span>+@</span><span class="keyword">Order</span><span>)&gt;0&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order1&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;@</span><span class="keyword">Order</span><span>&nbsp;+&nbsp;</span><span class="string">','</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(</span><span class="func">REPLACE</span><span>(@new_order2,</span><span class="string">'ASC,'</span><span>,</span><span class="string">'{ASC},'</span><span>),</span><span class="string">'DESC,'</span><span>,</span><span class="string">'{DESC},'</span><span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(</span><span class="func">REPLACE</span><span>(@new_order2,</span><span class="string">'{ASC},'</span><span>,</span><span class="string">'DESC,'</span><span>),</span><span class="string">'{DESC},'</span><span>,</span><span class="string">'ASC,'</span><span>)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order2&nbsp;=&nbsp;</span><span class="string">'&nbsp;ORDER&nbsp;BY&nbsp;'</span><span>&nbsp;+&nbsp;</span><span class="func">SUBSTRING</span><span>(@new_order2,1,LEN(@new_order2)-1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@FieldList&nbsp;&lt;&gt;&nbsp;<span class="string">'*'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order3&nbsp;=&nbsp;</span><span class="func">REPLACE</span><span>(</span><span class="func">REPLACE</span><span>(@</span><span class="keyword">Order</span><span>&nbsp;+&nbsp;</span><span class="string">','</span><span>,</span><span class="string">'ASC,'</span><span>,</span><span class="string">','</span><span>),</span><span class="string">'DESC,'</span><span>,</span><span class="string">','</span><span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@FieldList&nbsp;=&nbsp;</span><span class="string">','</span><span>&nbsp;+&nbsp;@FieldList&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHILE&nbsp;CHARINDEX(<span class="string">','</span><span>,@new_order3)&gt;0&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;CHARINDEX(<span class="func">SUBSTRING</span><span>(</span><span class="string">','</span><span>+@new_order3,1,CHARINDEX(</span><span class="string">','</span><span>,@new_order3)),</span><span class="string">','</span><span>+@FieldList+</span><span class="string">','</span><span>)&gt;0&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@FieldList&nbsp;=&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@FieldList&nbsp;+&nbsp;<span class="string">','</span><span>&nbsp;+&nbsp;</span><span class="func">SUBSTRING</span><span>(@new_order3,1,CHARINDEX(</span><span class="string">','</span><span>,@new_order3))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@new_order3&nbsp;=&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="func">SUBSTRING</span><span>(@new_order3,CHARINDEX(</span><span class="string">','</span><span>,@new_order3)+1,LEN(@new_order3))&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@FieldList&nbsp;=&nbsp;</span><span class="func">SUBSTRING</span><span>(@FieldList,2,LEN(@FieldList))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@SqlCount&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;@TotalCount=COUNT(*),@TotalPageCount=CEILING((COUNT(*)+0.0)/'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="func">CAST</span><span>(@PageSize&nbsp;</span><span class="keyword">AS</span><span>&nbsp;</span><span class="keyword">VARCHAR</span><span>)+</span><span class="string">')&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where1&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@RecorderCount&nbsp;&nbsp;=&nbsp;0&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">EXEC</span><span>&nbsp;SP_EXECUTESQL&nbsp;@SqlCount,N</span><span class="string">'@TotalCount&nbsp;INT&nbsp;OUTPUT,@TotalPageCount&nbsp;INT&nbsp;OUTPUT'</span><span>,&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@TotalCount&nbsp;<span class="keyword">OUTPUT</span><span>,@TotalPageCount&nbsp;</span><span class="keyword">OUTPUT</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SELECT</span><span>&nbsp;@TotalCount&nbsp;=&nbsp;@RecorderCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;&gt;&nbsp;CEILING((@TotalCount+0.0)/@PageSize)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@PageIndex&nbsp;=&nbsp;&nbsp;CEILING((@TotalCount+0.0)/@PageSize)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;=&nbsp;1&nbsp;<span class="op">OR</span><span>&nbsp;@PageIndex&nbsp;&gt;=&nbsp;CEILING((@TotalCount+0.0)/@PageSize)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;=&nbsp;1&nbsp;<span class="comment">--返回第一页数据</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;&gt;=&nbsp;CEILING((@TotalCount+0.0)/@PageSize)&nbsp;&nbsp;<span class="comment">--返回最后一页数据</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;('</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(</span><span class="func">ABS</span><span>(@PageSize*@PageIndex-@TotalCount-@PageSize))&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order2&nbsp;+&nbsp;<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;1&nbsp;&nbsp;<span class="comment">--仅主键正序排序</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;&lt;=&nbsp;CEILING((@TotalCount+0.0)/@PageSize)/2&nbsp;&nbsp;<span class="comment">--正向检索</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where2&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;<span class="string">'&nbsp;&gt;&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'(SELECT&nbsp;MAX('</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">')&nbsp;FROM&nbsp;(SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;STR(@PageSize*(@PageIndex-1))&nbsp;+&nbsp;<span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order1&nbsp;+<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP)&nbsp;'</span><span>+&nbsp;@new_order1&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span><span class="comment">--反向检索</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;('</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where2&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;<span class="string">'&nbsp;&lt;&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'(SELECT&nbsp;MIN('</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">')&nbsp;FROM&nbsp;(SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;STR(@TotalCount-@PageSize*@PageIndex)&nbsp;+&nbsp;<span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order2&nbsp;+<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP)&nbsp;'</span><span>+&nbsp;@new_order2&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;2&nbsp;&nbsp;<span class="comment">--仅主键反序排序</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;&lt;=&nbsp;CEILING((@TotalCount+0.0)/@PageSize)/2&nbsp;&nbsp;<span class="comment">--正向检索</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where2&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;<span class="string">'&nbsp;&lt;&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'(SELECT&nbsp;MIN('</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">')&nbsp;FROM&nbsp;(SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;STR(@PageSize*(@PageIndex-1))&nbsp;+&nbsp;<span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+<span class="string">'&nbsp;FROM&nbsp;'</span><span>+&nbsp;@TableName&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order1&nbsp;+&nbsp;<span class="string">')&nbsp;AS&nbsp;TMP)&nbsp;'</span><span>+&nbsp;@new_order1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span><span class="comment">--反向检索</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;('</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where2&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;<span class="string">'&nbsp;&gt;&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'(SELECT&nbsp;MAX('</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">')&nbsp;FROM&nbsp;(SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;STR(@TotalCount-@PageSize*@PageIndex)&nbsp;+&nbsp;<span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order2&nbsp;+<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP)&nbsp;'</span><span>+&nbsp;@new_order2&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@SortType&nbsp;=&nbsp;3&nbsp;&nbsp;<span class="comment">--多列排序,必须包含主键,且放置最后,否则不处理</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;CHARINDEX(<span class="string">','</span><span>&nbsp;+&nbsp;@PrimaryKey&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>,</span><span class="string">','</span><span>&nbsp;+&nbsp;@</span><span class="keyword">Order</span><span>)&nbsp;=&nbsp;0&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;PRINT(</span><span class="string">'ERR_02'</span><span>)&nbsp;</span><span class="keyword">RETURN</span><span>&nbsp;</span><span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF&nbsp;@PageIndex&nbsp;&lt;=&nbsp;CEILING((@TotalCount+0.0)/@PageSize)/2&nbsp;&nbsp;<span class="comment">--正向检索</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;(&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;(&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize*@PageIndex)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order1&nbsp;+&nbsp;</span><span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_order2&nbsp;+&nbsp;<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">ELSE</span><span>&nbsp;&nbsp;</span><span class="comment">--反向检索</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">BEGIN</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">SET</span><span>&nbsp;@Sql&nbsp;=&nbsp;</span><span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;(&nbsp;'</span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;+&nbsp;</span><span class="string">'&nbsp;FROM&nbsp;(&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;SELECT&nbsp;TOP&nbsp;'</span><span>&nbsp;+&nbsp;STR(@TotalCount-@PageSize*@PageIndex+@PageSize)&nbsp;+&nbsp;</span><span class="string">'&nbsp;'</span><span>&nbsp;+&nbsp;@FieldList&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;<span class="string">'&nbsp;FROM&nbsp;'</span><span>&nbsp;+&nbsp;@TableName&nbsp;+&nbsp;@new_where1&nbsp;+&nbsp;@new_order2&nbsp;+&nbsp;</span><span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+&nbsp;@new_order1&nbsp;+&nbsp;<span class="string">'&nbsp;)&nbsp;AS&nbsp;TMP&nbsp;'</span><span>&nbsp;+&nbsp;@new_order1&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">END</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;PRINT(@Sql)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">EXEC</span><span>(@Sql)&nbsp;&nbsp;</span></span></li><li class=""><span>GO&nbsp;&nbsp;</span></li></ol></div><pre code_snippet_id="393176" snippet_file_name="blog_20140615_1_8327674" name="code" class="sql" style="display: none;">CREATE PROC P_viewPage
  107. @TableName VARCHAR(200), --表名
  108. @FieldList VARCHAR(2000), --显示列名,如果是全部字段则为*
  109. @PrimaryKey VARCHAR(100), --单一主键或唯一值键
  110. @Where VARCHAR(2000), --查询条件 不含'where'字符,如id&gt;10 and len(userid)&gt;9
  111. @Order VARCHAR(1000), --排序 不含'order by'字符,如id asc,userid desc,必须指定asc或desc
  112. --注意当@SortType=3时生效,记住一定要在最后加上主键,否则会让你比较郁闷
  113. @SortType INT, --排序规则 1:正序asc 2:倒序desc 3:多列排序方法
  114. @RecorderCount INT, --记录总数 0:会返回总记录
  115. @PageSize INT, --每页输出的记录数
  116. @PageIndex INT, --当前页数
  117. @TotalCount INT OUTPUT, --记返回总记录
  118. @TotalPageCount INT OUTPUT --返回总页数
  119. AS
  120. SET NOCOUNT ON
  121. IF ISNULL(@TotalCount,'') = '' SET @TotalCount = 0
  122. SET @Order = RTRIM(LTRIM(@Order))
  123. SET @PrimaryKey = RTRIM(LTRIM(@PrimaryKey))
  124. SET @FieldList = REPLACE(RTRIM(LTRIM(@FieldList)),' ','')
  125. WHILE CHARINDEX(', ',@Order) &gt; 0 OR CHARINDEX(' ,',@Order) &gt; 0
  126. BEGIN
  127. SET @Order = REPLACE(@Order,', ',',')
  128. SET @Order = REPLACE(@Order,' ,',',')
  129. END
  130. IF ISNULL(@TableName,'') = '' OR ISNULL(@FieldList,'') = ''
  131. OR ISNULL(@PrimaryKey,'') = ''
  132. OR @SortType &lt; 1 OR @SortType &gt;3
  133. OR @RecorderCount &lt; 0 OR @PageSize &lt; 0 OR @PageIndex &lt; 0
  134. BEGIN
  135. PRINT('ERR_00')
  136. RETURN
  137. END
  138. IF @SortType = 3
  139. BEGIN
  140. IF (UPPER(RIGHT(@Order,4))!=' ASC' AND UPPER(RIGHT(@Order,5))!=' DESC')
  141. BEGIN PRINT('ERR_02') RETURN END
  142. END
  143. DECLARE @new_where1 VARCHAR(1000)
  144. DECLARE @new_where2 VARCHAR(1000)
  145. DECLARE @new_order1 VARCHAR(1000)
  146. DECLARE @new_order2 VARCHAR(1000)
  147. DECLARE @new_order3 VARCHAR(1000)
  148. DECLARE @Sql VARCHAR(8000)
  149. DECLARE @SqlCount NVARCHAR(4000)
  150. IF ISNULL(@where,'') = ''
  151. BEGIN
  152. SET @new_where1 = ' '
  153. SET @new_where2 = ' WHERE '
  154. END
  155. ELSE
  156. BEGIN
  157. SET @new_where1 = ' WHERE ' + @where
  158. SET @new_where2 = ' WHERE ' + @where + ' AND '
  159. END
  160. IF ISNULL(@order,'') = '' OR @SortType = 1 OR @SortType = 2
  161. BEGIN
  162. IF @SortType = 1
  163. BEGIN
  164. SET @new_order1 = ' ORDER BY ' + @PrimaryKey + ' ASC'
  165. SET @new_order2 = ' ORDER BY ' + @PrimaryKey + ' DESC'
  166. END
  167. IF @SortType = 2
  168. BEGIN
  169. SET @new_order1 = ' ORDER BY ' + @PrimaryKey + ' DESC'
  170. SET @new_order2 = ' ORDER BY ' + @PrimaryKey + ' ASC'
  171. END
  172. END
  173. ELSE
  174. BEGIN
  175. SET @new_order1 = ' ORDER BY ' + @Order
  176. END
  177. IF @SortType = 3 AND CHARINDEX(','+@PrimaryKey+' ',','+@Order)&gt;0
  178. BEGIN
  179. SET @new_order1 = ' ORDER BY ' + @Order
  180. SET @new_order2 = @Order + ','
  181. SET @new_order2 = REPLACE(REPLACE(@new_order2,'ASC,','{ASC},'),'DESC,','{DESC},')
  182. SET @new_order2 = REPLACE(REPLACE(@new_order2,'{ASC},','DESC,'),'{DESC},','ASC,')
  183. SET @new_order2 = ' ORDER BY ' + SUBSTRING(@new_order2,1,LEN(@new_order2)-1)
  184. IF @FieldList &lt;&gt; '*'
  185. BEGIN
  186. SET @new_order3 = REPLACE(REPLACE(@Order + ',','ASC,',','),'DESC,',',')
  187. SET @FieldList = ',' + @FieldList
  188. WHILE CHARINDEX(',',@new_order3)&gt;0
  189. BEGIN
  190. IF CHARINDEX(SUBSTRING(','+@new_order3,1,CHARINDEX(',',@new_order3)),','+@FieldList+',')&gt;0
  191. BEGIN
  192. SET @FieldList =
  193. @FieldList + ',' + SUBSTRING(@new_order3,1,CHARINDEX(',',@new_order3))
  194. END
  195. SET @new_order3 =
  196. SUBSTRING(@new_order3,CHARINDEX(',',@new_order3)+1,LEN(@new_order3))
  197. END
  198. SET @FieldList = SUBSTRING(@FieldList,2,LEN(@FieldList))
  199. END
  200. END
  201. SET @SqlCount = 'SELECT @TotalCount=COUNT(*),@TotalPageCount=CEILING((COUNT(*)+0.0)/'
  202. + CAST(@PageSize AS VARCHAR)+') FROM ' + @TableName + @new_where1
  203. IF @RecorderCount = 0
  204. BEGIN
  205. EXEC SP_EXECUTESQL @SqlCount,N'@TotalCount INT OUTPUT,@TotalPageCount INT OUTPUT',
  206. @TotalCount OUTPUT,@TotalPageCount OUTPUT
  207. END
  208. ELSE
  209. BEGIN
  210. SELECT @TotalCount = @RecorderCount
  211. END
  212. IF @PageIndex &gt; CEILING((@TotalCount+0.0)/@PageSize)
  213. BEGIN
  214. SET @PageIndex = CEILING((@TotalCount+0.0)/@PageSize)
  215. END
  216. IF @PageIndex = 1 OR @PageIndex &gt;= CEILING((@TotalCount+0.0)/@PageSize)
  217. BEGIN
  218. IF @PageIndex = 1 --返回第一页数据
  219. BEGIN
  220. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM '
  221. + @TableName + @new_where1 + @new_order1
  222. END
  223. IF @PageIndex &gt;= CEILING((@TotalCount+0.0)/@PageSize) --返回最后一页数据
  224. BEGIN
  225. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ('
  226. + 'SELECT TOP ' + STR(ABS(@PageSize*@PageIndex-@TotalCount-@PageSize))
  227. + ' ' + @FieldList + ' FROM '
  228. + @TableName + @new_where1 + @new_order2 + ' ) AS TMP '
  229. + @new_order1
  230. END
  231. END
  232. ELSE
  233. BEGIN
  234. IF @SortType = 1 --仅主键正序排序
  235. BEGIN
  236. IF @PageIndex &lt;= CEILING((@TotalCount+0.0)/@PageSize)/2 --正向检索
  237. BEGIN
  238. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM '
  239. + @TableName + @new_where2 + @PrimaryKey + ' &gt; '
  240. + '(SELECT MAX(' + @PrimaryKey + ') FROM (SELECT TOP '
  241. + STR(@PageSize*(@PageIndex-1)) + ' ' + @PrimaryKey
  242. + ' FROM ' + @TableName
  243. + @new_where1 + @new_order1 +' ) AS TMP) '+ @new_order1
  244. END
  245. ELSE --反向检索
  246. BEGIN
  247. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ('
  248. + 'SELECT TOP ' + STR(@PageSize) + ' '
  249. + @FieldList + ' FROM '
  250. + @TableName + @new_where2 + @PrimaryKey + ' &lt; '
  251. + '(SELECT MIN(' + @PrimaryKey + ') FROM (SELECT TOP '
  252. + STR(@TotalCount-@PageSize*@PageIndex) + ' ' + @PrimaryKey
  253. + ' FROM ' + @TableName
  254. + @new_where1 + @new_order2 +' ) AS TMP) '+ @new_order2
  255. + ' ) AS TMP ' + @new_order1
  256. END
  257. END
  258. IF @SortType = 2 --仅主键反序排序
  259. BEGIN
  260. IF @PageIndex &lt;= CEILING((@TotalCount+0.0)/@PageSize)/2 --正向检索
  261. BEGIN
  262. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM '
  263. + @TableName + @new_where2 + @PrimaryKey + ' &lt; '
  264. + '(SELECT MIN(' + @PrimaryKey + ') FROM (SELECT TOP '
  265. + STR(@PageSize*(@PageIndex-1)) + ' ' + @PrimaryKey
  266. +' FROM '+ @TableName
  267. + @new_where1 + @new_order1 + ') AS TMP) '+ @new_order1
  268. END
  269. ELSE --反向检索
  270. BEGIN
  271. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ('
  272. + 'SELECT TOP ' + STR(@PageSize) + ' '
  273. + @FieldList + ' FROM '
  274. + @TableName + @new_where2 + @PrimaryKey + ' &gt; '
  275. + '(SELECT MAX(' + @PrimaryKey + ') FROM (SELECT TOP '
  276. + STR(@TotalCount-@PageSize*@PageIndex) + ' ' + @PrimaryKey
  277. + ' FROM ' + @TableName
  278. + @new_where1 + @new_order2 +' ) AS TMP) '+ @new_order2
  279. + ' ) AS TMP ' + @new_order1
  280. END
  281. END
  282. IF @SortType = 3 --多列排序,必须包含主键,且放置最后,否则不处理
  283. BEGIN
  284. IF CHARINDEX(',' + @PrimaryKey + ' ',',' + @Order) = 0
  285. BEGIN PRINT('ERR_02') RETURN END
  286. IF @PageIndex &lt;= CEILING((@TotalCount+0.0)/@PageSize)/2 --正向检索
  287. BEGIN
  288. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ( '
  289. + 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ( '
  290. + ' SELECT TOP ' + STR(@PageSize*@PageIndex) + ' ' + @FieldList
  291. + ' FROM ' + @TableName + @new_where1 + @new_order1 + ' ) AS TMP '
  292. + @new_order2 + ' ) AS TMP ' + @new_order1
  293. END
  294. ELSE --反向检索
  295. BEGIN
  296. SET @Sql = 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ( '
  297. + 'SELECT TOP ' + STR(@PageSize) + ' ' + @FieldList + ' FROM ( '
  298. + ' SELECT TOP ' + STR(@TotalCount-@PageSize*@PageIndex+@PageSize) + ' ' + @FieldList
  299. + ' FROM ' + @TableName + @new_where1 + @new_order2 + ' ) AS TMP '
  300. + @new_order1 + ' ) AS TMP ' + @new_order1
  301. END
  302. END
  303. END
  304. PRINT(@Sql)
  305. EXEC(@Sql)
  306. GO</pre><br><br><br><p><span style="font-size:14px;">2、SQL Server 中调用测试代码</span></p><p><span style="font-size:14px;"></span></p><div class="dp-highlighter bg_sql"><div class="bar"><div class="tools"><b>[sql]</b> <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="ViewSource" title="view plain" onclick="dp.sh.Toolbar.Command(&#39;ViewSource&#39;,this);return false;">view plain</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="CopyToClipboard" title="copy" onclick="dp.sh.Toolbar.Command(&#39;CopyToClipboard&#39;,this);return false;">copy</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="PrintSource" title="print" onclick="dp.sh.Toolbar.Command(&#39;PrintSource&#39;,this);return false;">print</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="About" title="?" onclick="dp.sh.Toolbar.Command(&#39;About&#39;,this);return false;">?</a><a href="https://code.csdn.net/snippets/393176" target="_blank" title="在CODE上查看代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="position:relative;top:1px;left:2px;"></a><a href="https://code.csdn.net/snippets/393176/fork" target="_blank" title="派生到我的代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="position:relative;top:2px;left:2px;"></a><div style="position: absolute; left: 428px; top: 4746px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_2" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_2" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=2&amp;width=18&amp;height=18" wmode="transparent"></div></div></div><ol start="1" class="dp-sql"><li class="alt"><span><span class="comment">--执行存储过程</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span><span class="keyword">declare</span><span>&nbsp;@TotalCount&nbsp;</span><span class="keyword">int</span><span>,&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@TotalPageCount&nbsp;<span class="keyword">int</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span><span class="keyword">exec</span><span>&nbsp;P_viewPage&nbsp;</span><span class="string">'T_Module'</span><span>,</span><span class="string">'*'</span><span>,</span><span class="string">'ModuleID'</span><span>,</span><span class="string">''</span><span>,</span><span class="string">''</span><span>,1,0,10,1,@TotalCount&nbsp;</span><span class="keyword">output</span><span>,@TotalPageCount&nbsp;</span><span class="keyword">output</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span><span class="keyword">Select</span><span>&nbsp;@TotalCount,@TotalPageCount;&nbsp;&nbsp;</span></span></li></ol></div><pre code_snippet_id="393176" snippet_file_name="blog_20140615_2_5928886" name="code" class="sql" style="display: none;">--执行存储过程
  307. declare @TotalCount int,
  308. @TotalPageCount int
  309. exec P_viewPage 'T_Module','*','ModuleID','','',1,0,10,1,@TotalCount output,@TotalPageCount output
  310. Select @TotalCount,@TotalPageCount;</pre><br><p></p><p><span style="font-size:14px;">asp.net 代码实现:</span></p><p><span style="font-size:14px;">&nbsp;</span></p><div class="dp-highlighter bg_csharp"><div class="bar"><div class="tools"><b>[csharp]</b> <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="ViewSource" title="view plain" onclick="dp.sh.Toolbar.Command(&#39;ViewSource&#39;,this);return false;">view plain</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="CopyToClipboard" title="copy" onclick="dp.sh.Toolbar.Command(&#39;CopyToClipboard&#39;,this);return false;">copy</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="PrintSource" title="print" onclick="dp.sh.Toolbar.Command(&#39;PrintSource&#39;,this);return false;">print</a><a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="About" title="?" onclick="dp.sh.Toolbar.Command(&#39;About&#39;,this);return false;">?</a><a href="https://code.csdn.net/snippets/393176" target="_blank" title="在CODE上查看代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/CODE_ico.png" width="12" height="12" alt="在CODE上查看代码片" style="position:relative;top:1px;left:2px;"></a><a href="https://code.csdn.net/snippets/393176/fork" target="_blank" title="派生到我的代码片" style="text-indent:0;"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/ico_fork.svg" width="12" height="12" alt="派生到我的代码片" style="position:relative;top:2px;left:2px;"></a><div style="position: absolute; left: 453px; top: 4983px; width: 18px; height: 18px; z-index: 99;"><embed id="ZeroClipboardMovie_3" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="18" height="18" name="ZeroClipboardMovie_3" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=3&amp;width=18&amp;height=18" wmode="transparent"></div></div></div><ol start="1" class="dp-c"><li class="alt"><span><span class="preprocessor">#region&nbsp;===========通用分页存储过程===========</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">public</span><span>&nbsp;</span><span class="keyword">static</span><span>&nbsp;DataSet&nbsp;RunProcedureDS(</span><span class="keyword">string</span><span>&nbsp;connectionString,&nbsp;</span><span class="keyword">string</span><span>&nbsp;storedProcName,&nbsp;IDataParameter[]&nbsp;parameters,&nbsp;</span><span class="keyword">string</span><span>&nbsp;tableName)&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">using</span><span>&nbsp;(SqlConnection&nbsp;connection&nbsp;=&nbsp;</span><span class="keyword">new</span><span>&nbsp;SqlConnection(connectionString))&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet&nbsp;dataSet&nbsp;=&nbsp;<span class="keyword">new</span><span>&nbsp;DataSet();&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Open();&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SqlDataAdapter&nbsp;sqlDA&nbsp;=&nbsp;<span class="keyword">new</span><span>&nbsp;SqlDataAdapter();&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sqlDA.SelectCommand&nbsp;=&nbsp;BuildQueryCommand(connection,&nbsp;storedProcName,&nbsp;parameters);&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sqlDA.Fill(dataSet,&nbsp;tableName);&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection.Close();&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return</span><span>&nbsp;dataSet;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;summary&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;通用分页存储过程</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;/summary&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="connectionString"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="tblName"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="strGetFields"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="primaryKey"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="strWhere"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="strOrder"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="sortType"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="recordCount"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="PageSize"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="PageIndex"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="totalCount"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;param&nbsp;name="totalPageCount"&gt;&lt;/param&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">///&nbsp;&lt;returns&gt;&lt;/returns&gt;</span><span>&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">public</span><span>&nbsp;</span><span class="keyword">static</span><span>&nbsp;DataSet&nbsp;PageList(</span><span class="keyword">string</span><span>&nbsp;connectionString,&nbsp;</span><span class="keyword">string</span><span>&nbsp;tblName,&nbsp;</span><span class="keyword">string</span><span>&nbsp;strGetFields,&nbsp;</span><span class="keyword">string</span><span>&nbsp;primaryKey,&nbsp;</span><span class="keyword">string</span><span>&nbsp;strWhere,&nbsp;</span><span class="keyword">string</span><span>&nbsp;strOrder,&nbsp;</span><span class="keyword">int</span><span>&nbsp;sortType,&nbsp;</span><span class="keyword">int</span><span>&nbsp;recordCount,&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">int</span><span>&nbsp;PageSize,&nbsp;</span><span class="keyword">int</span><span>&nbsp;PageIndex,</span><span class="keyword">ref</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;totalCount,</span><span class="keyword">ref</span><span>&nbsp;</span><span class="keyword">int</span><span>&nbsp;totalPageCount)&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SqlParameter[]&nbsp;parameters&nbsp;={&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@TableName&nbsp;"</span><span>,SqlDbType.VarChar,200),&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@FieldList"</span><span>,SqlDbType.VarChar,2000),&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@PrimaryKey"</span><span>,SqlDbType.VarChar,100),&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@Where"</span><span>,SqlDbType.VarChar,2000),&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@Order"</span><span>,SqlDbType.VarChar,1000),&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@SortType"</span><span>,SqlDbType.Int),&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@RecorderCount"</span><span>,SqlDbType.Int),&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@PageSize"</span><span>,SqlDbType.Int),&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@PageIndex"</span><span>,SqlDbType.Int),&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@TotalCount"</span><span>,SqlDbType.Int),&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">new</span><span>&nbsp;SqlParameter(</span><span class="string">"@TotalPageCount"</span><span>,SqlDbType.Int)};&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[0].Value&nbsp;=&nbsp;tblName;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[1].Value&nbsp;=&nbsp;strGetFields;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[2].Value&nbsp;=&nbsp;primaryKey;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[3].Value&nbsp;=&nbsp;strWhere;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[4].Value&nbsp;=&nbsp;strOrder;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[5].Value&nbsp;=&nbsp;sortType;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[6].Value&nbsp;=&nbsp;recordCount;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[7].Value&nbsp;=&nbsp;PageSize;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[8].Value&nbsp;=&nbsp;PageIndex;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[9].Value&nbsp;=&nbsp;totalCount;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[9].Direction&nbsp;=&nbsp;ParameterDirection.Output;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[10].Value&nbsp;=&nbsp;totalPageCount;&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters[10].Direction&nbsp;=&nbsp;ParameterDirection.Output;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet&nbsp;ds&nbsp;=&nbsp;RunProcedureDS(connectionString,&nbsp;<span class="string">"P_viewPage"</span><span>,&nbsp;parameters,&nbsp;</span><span class="string">"PageListTable"</span><span>);&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;totalCount&nbsp;=&nbsp;<span class="keyword">int</span><span>.Parse(parameters[9].Value.ToString());&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;totalPageCount&nbsp;=&nbsp;<span class="keyword">int</span><span>.Parse(parameters[10].Value.ToString());&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return</span><span>&nbsp;ds;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li class=""><span><span class="preprocessor">&nbsp;&nbsp;&nbsp;&nbsp;#endregion</span><span>&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>DataSet&nbsp;ds&nbsp;=&nbsp;SqlHelper.PageList(SqlHelper.LocalSqlServer,&nbsp;<span class="string">"T_User"</span><span>,&nbsp;</span><span class="string">"*"</span><span>,&nbsp;</span><span class="string">"UserID"</span><span>,&nbsp;</span><span class="string">""</span><span>,&nbsp;</span><span class="string">""</span><span>,&nbsp;1,&nbsp;0,&nbsp;pageSize,&nbsp;1,&nbsp;</span><span class="keyword">ref</span><span>&nbsp;totalCount,&nbsp;</span><span class="keyword">ref</span><span>&nbsp;totalPageCount);&nbsp;&nbsp;</span></span></li><li class="alt"><span><span class="keyword">this</span><span>.RptData.DataSource&nbsp;=&nbsp;ds;&nbsp;&nbsp;</span></span></li><li class=""><span><span class="keyword">this</span><span>.RptData.DataBind();&nbsp;&nbsp;</span></span></li></ol></div><pre code_snippet_id="393176" snippet_file_name="blog_20140615_3_4293466" name="code" class="csharp" style="display: none;">#region ===========通用分页存储过程===========
  311. public static DataSet RunProcedureDS(string connectionString, string storedProcName, IDataParameter[] parameters, string tableName)
  312. {
  313. using (SqlConnection connection = new SqlConnection(connectionString))
  314. {
  315. DataSet dataSet = new DataSet();
  316. connection.Open();
  317. SqlDataAdapter sqlDA = new SqlDataAdapter();
  318. sqlDA.SelectCommand = BuildQueryCommand(connection, storedProcName, parameters);
  319. sqlDA.Fill(dataSet, tableName);
  320. connection.Close();
  321. return dataSet;
  322. }
  323. }
  324. /// &lt;summary&gt;
  325. /// 通用分页存储过程
  326. /// &lt;/summary&gt;
  327. /// &lt;param name="connectionString"&gt;&lt;/param&gt;
  328. /// &lt;param name="tblName"&gt;&lt;/param&gt;
  329. /// &lt;param name="strGetFields"&gt;&lt;/param&gt;
  330. /// &lt;param name="primaryKey"&gt;&lt;/param&gt;
  331. /// &lt;param name="strWhere"&gt;&lt;/param&gt;
  332. /// &lt;param name="strOrder"&gt;&lt;/param&gt;
  333. /// &lt;param name="sortType"&gt;&lt;/param&gt;
  334. /// &lt;param name="recordCount"&gt;&lt;/param&gt;
  335. /// &lt;param name="PageSize"&gt;&lt;/param&gt;
  336. /// &lt;param name="PageIndex"&gt;&lt;/param&gt;
  337. /// &lt;param name="totalCount"&gt;&lt;/param&gt;
  338. /// &lt;param name="totalPageCount"&gt;&lt;/param&gt;
  339. /// &lt;returns&gt;&lt;/returns&gt;
  340. public static DataSet PageList(string connectionString, string tblName, string strGetFields, string primaryKey, string strWhere, string strOrder, int sortType, int recordCount,
  341. int PageSize, int PageIndex,ref int totalCount,ref int totalPageCount)
  342. {
  343. SqlParameter[] parameters ={ new SqlParameter("@TableName ",SqlDbType.VarChar,200),
  344. new SqlParameter("@FieldList",SqlDbType.VarChar,2000),
  345. new SqlParameter("@PrimaryKey",SqlDbType.VarChar,100),
  346. new SqlParameter("@Where",SqlDbType.VarChar,2000),
  347. new SqlParameter("@Order",SqlDbType.VarChar,1000),
  348. new SqlParameter("@SortType",SqlDbType.Int),
  349. new SqlParameter("@RecorderCount",SqlDbType.Int),
  350. new SqlParameter("@PageSize",SqlDbType.Int),
  351. new SqlParameter("@PageIndex",SqlDbType.Int),
  352. new SqlParameter("@TotalCount",SqlDbType.Int),
  353. new SqlParameter("@TotalPageCount",SqlDbType.Int)};
  354. parameters[0].Value = tblName;
  355. parameters[1].Value = strGetFields;
  356. parameters[2].Value = primaryKey;
  357. parameters[3].Value = strWhere;
  358. parameters[4].Value = strOrder;
  359. parameters[5].Value = sortType;
  360. parameters[6].Value = recordCount;
  361. parameters[7].Value = PageSize;
  362. parameters[8].Value = PageIndex;
  363. parameters[9].Value = totalCount;
  364. parameters[9].Direction = ParameterDirection.Output;
  365. parameters[10].Value = totalPageCount;
  366. parameters[10].Direction = ParameterDirection.Output;
  367. DataSet ds = RunProcedureDS(connectionString, "P_viewPage", parameters, "PageListTable");
  368. totalCount = int.Parse(parameters[9].Value.ToString());
  369. totalPageCount = int.Parse(parameters[10].Value.ToString());
  370. return ds;
  371. }
  372. #endregion
  373. DataSet ds = SqlHelper.PageList(SqlHelper.LocalSqlServer, "T_User", "*", "UserID", "", "", 1, 0, pageSize, 1, ref totalCount, ref totalPageCount);
  374. this.RptData.DataSource = ds;
  375. this.RptData.DataBind();</pre><br><p></p>
  376. </div>
  377. <!-- Baidu Button BEGIN -->
  378. <div class="bdsharebuttonbox bdshare-button-style0-16" style="float: right;" data-bd-bind="1411284913253">
  379. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_more" data-cmd="more" style="background-position:0 0 !important; background-image: url(http://bdimg.share.baidu.com/static/api/img/share/icons_0_16.png?v=d754dcc0.png) !important"></a>
  380. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间" style="background-position:0 -52px !important"></a>
  381. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博" style="background-position:0 -104px !important"></a>
  382. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博" style="background-position:0 -260px !important"></a>
  383. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_renren" data-cmd="renren" title="分享到人人网" style="background-position:0 -208px !important"></a>
  384. <a href="http://blog.csdn.net/zdw_wym/article/details/30974033#" class="bds_weixin" data-cmd="weixin" title="分享到微信" style="background-position:0 -1612px !important"></a>
  385. </div>
  386. <script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
  387. <!-- Baidu Button END -->
  388. <!--192.168.100.35-->
  389. <ul class="article_next_prev">
  390. <li class="prev_article"><span onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_shangyipian&#39;]);location.href=&#39;/zdw_wym/article/details/30457927&#39;;">上一篇</span><a href="http://blog.csdn.net/zdw_wym/article/details/30457927" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_shangyipian&#39;])">一个jquery的小例子</a></li>
  391. <li class="next_article"><span onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_xiayipian&#39;]);location.href=&#39;/zdw_wym/article/details/38066745&#39;;">下一篇</span><a href="http://blog.csdn.net/zdw_wym/article/details/38066745" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_xiayipian&#39;])">ORA-28001: the password has expired解决办法</a></li>
  392. </ul>
  393. <!-- Baidu Button BEGIN -->
  394. <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=1536434" src="./asp.net SQL Server 存储过程分页及代码调用 _files/bds_s_v2.js"></script>
  395. <script type="text/javascript">
  396. document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
  397. </script>
  398. <!-- Baidu Button END -->
  399. </div>
  400. <dl class="blog-associat-tag">
  401. <dt>主题推荐</dt>
  402. <dd>
  403. <a href="http://www.csdn.net/tag/sql%20server" target="_blank" class="blog-tage-red">sql server</a>
  404. <a href="http://www.csdn.net/tag/%E5%AD%98%E5%82%A8" target="_blank" class="blog-tage-red">存储</a>
  405. <a href="http://www.csdn.net/tag/%E5%88%86%E9%A1%B5" target="_blank" class="blog-tage-red">分页</a>
  406. <a href="http://www.csdn.net/tag/asp.net" target="_blank" class="blog-tage-red">asp.net</a>
  407. <a href="http://www.csdn.net/tag/%E6%95%B0%E6%8D%AE" target="_blank" class="blog-tage-red">数据</a>
  408. </dd>
  409. </dl>
  410. <dl class="blog-ass-articl tracking-ad" data-mod="popu_36" id="res-relatived">
  411. <dt><span>猜你在找</span></dt>
  412. <dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/huangtao2011/article/details/7209392" title="asp.net 常用功能" strategy="SearchAlgorithm" target="_blank">asp.net 常用功能</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/li_ser/article/details/24306677" title="ASP.NET优化" strategy="SearchAlgorithm" target="_blank">ASP.NET优化</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/jingxuewang110/article/details/6835280" title="sql server面试题" strategy="SearchAlgorithm" target="_blank">sql server面试题</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/passvcword/article/details/9133829" title="[知识库分享系列] 二、.NET(ASP.NET)" strategy="SearchAlgorithm" target="_blank">[知识库分享系列] 二、.NET(ASP.NET)</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/zhanglan478950/article/details/8914529" title="C#+SQL Server" strategy="SearchAlgorithm" target="_blank">C#+SQL Server</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/z123500/article/details/8454219" title="Asp.net性能的技巧" strategy="SearchAlgorithm" target="_blank">Asp.net性能的技巧</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/sbwgdc/article/details/19341705" title="ASP.NET面试资料" strategy="SearchAlgorithm" target="_blank">ASP.NET面试资料</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/bhn_candy/article/details/16987435" title="何种情况适用存储过程以及常用的分页、查询案例" strategy="SearchAlgorithm" target="_blank">何种情况适用存储过程以及常用的分页、查询案例</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/chengyingmingcheng/article/details/39030821" title="什么时候用存储过程" strategy="SearchAlgorithm" target="_blank">什么时候用存储过程</a></dd><dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="http://blog.csdn.net/gulijiang2008/article/details/7303413" title="asp.net网站的性能优化" strategy="SearchAlgorithm" target="_blank">asp.net网站的性能优化</a></dd></dl>
  413. <script type="text/javascript">
  414. var searchtitletags = 'asp.net SQL Server 存储过程分页及代码调用' + ',' + 'sql server,存储,分页,asp.net,数据';
  415. searchService({
  416. index: 'blog',
  417. query: searchtitletags,
  418. from: 10,
  419. size: 10,
  420. appendTo: '#res-relatived',
  421. url: 'recommend',
  422. his: 2,
  423. client: "blog_cf_enhance",
  424. tmpl: '<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="#{ url }" title="#{ title }" strategy="#{ strategy }">#{ title }</a></dd>'
  425. });
  426. </script>
  427. <div id="ad_cen">
  428. <script type="text/javascript">
  429. new Ad(4, 'ad_cen');
  430. </script>
  431. <iframe id="ad_frm_0" frameborder="0" scrolling="no" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ad(1).htm" style="border-width: 0px; overflow: hidden; width: 984px; height: 90px;"></iframe></div>
  432. <div class="comment_class">
  433. <div id="comment_title" class="panel_head">
  434. <span class="see_comment">查看评论</span><a name="comments"></a></div>
  435. <div id="comment_list"><br>&nbsp;&nbsp;暂无评论<br><br><div class="clear"></div></div>
  436. <div id="comment_bar">
  437. </div>
  438. <div id="comment_form"><div class="guest_link">您还没有登录,请<a href="javascript:void(0);" onclick="javascript:csdn.showLogin(function (dat) {js_logined(dat.data.userName);});">[登录]</a>或<a href="http://passport.csdn.net/account/register?from=http%3A%2F%2Fblog.csdn.net%2Fzdw_wym%2Farticle%2Fdetails%2F30974033">[注册]</a></div></div>
  439. <div class="announce">
  440. * 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场<a name="reply"></a><a name="quote"></a></div>
  441. </div>
  442. <script type="text/javascript">
  443. var fileName = '30974033';
  444. var commentscount = 0;
  445. var islock = false
  446. </script>
  447. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/comment.js"></script>
  448. <div id="ad_bot">
  449. <iframe id="ad_frm_1" frameborder="0" scrolling="no" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ad(2).htm" style="border-width: 0px; overflow: hidden; width: 984px; height: 0px;"></iframe></div>
  450. <script type="text/javascript">
  451. new Ad(5, 'ad_bot');
  452. </script>
  453. <div id="report_dialog">
  454. </div>
  455. <div id="d-top" style="bottom:60px;">
  456. <a id="quick-reply" class="btn btn-top q-reply" title="快速回复" style="display:none;">
  457. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/blog-icon-reply.png" alt="快速回复">
  458. </a>
  459. <a id="d-top-a" class="btn btn-top backtop" style="display: none;" title="返回顶部" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_huidaodingbu&#39;])">
  460. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/top.png" alt="TOP">
  461. </a>
  462. </div>
  463. <script type="text/javascript">
  464. $(function ()
  465. {
  466. $("#ad_frm_0").height("90px");
  467. setTimeout(function(){
  468. $("#ad_frm_2").height("200px");
  469. },1000);
  470. if($("#comment_content").length>0)
  471. {
  472. $("#quick-reply").show();
  473. $("#quick-reply").click(function(){
  474. setEditorFocus();
  475. });
  476. }
  477. var d_top = $('#d-top-a');
  478. document.onscroll = function ()
  479. {
  480. var scrTop = (document.body.scrollTop || document.documentElement.scrollTop);
  481. if (scrTop > 500)
  482. {
  483. d_top.show();
  484. } else
  485. {
  486. d_top.hide();
  487. }
  488. }
  489. $('#d-top-a').click(function ()
  490. {
  491. scrollTo(0, 0);
  492. this.blur();
  493. return false;
  494. });
  495. });
  496. </script>
  497. <style type="text/css">
  498. .tag_list
  499. {
  500. background: none repeat scroll 0 0 #FFFFFF;
  501. border: 1px solid #D7CBC1;
  502. color: #000000;
  503. font-size: 12px;
  504. line-height: 20px;
  505. list-style: none outside none;
  506. margin: 10px 2% 0 1%;
  507. padding: 1px;
  508. }
  509. .tag_list h5
  510. {
  511. background: none repeat scroll 0 0 #E0DBD3;
  512. color: #47381C;
  513. font-size: 12px;
  514. height: 24px;
  515. line-height: 24px;
  516. padding: 0 5px;
  517. margin: 0;
  518. }
  519. .tag_list h5 a
  520. {
  521. color: #47381C;
  522. }
  523. .classify
  524. {
  525. margin: 10px 0;
  526. padding: 4px 12px 8px;
  527. }
  528. .classify a
  529. {
  530. margin-right: 20px;
  531. white-space: nowrap;
  532. }
  533. </style>
  534. <div class="tag_list">
  535. <h5>
  536. <a href="http://www.csdn.net/tag/" target="_blank">核心技术类目</a></h5>
  537. <div class="classify">
  538. <a title="全部主题" href="http://www.csdn.net/tag" target="_blank" onclick="LogClickCount(this,336);">全部主题</a>
  539. <a title="Hadoop" href="http://g.csdn.net/5272865" target="_blank" onclick="LogClickCount(this,336);">Hadoop</a>
  540. <a title="AWS" href="http://g.csdn.net/5272866" target="_blank" onclick="LogClickCount(this,336);">AWS</a>
  541. <a title="移动游戏" href="http://g.csdn.net/5272870" target="_blank" onclick="LogClickCount(this,336);">移动游戏</a>
  542. <a title="Java" href="http://g.csdn.net/5272871" target="_blank" onclick="LogClickCount(this,336);">Java</a>
  543. <a title="Android" href="http://g.csdn.net/5272872" target="_blank" onclick="LogClickCount(this,336);">Android</a>
  544. <a title="iOS" href="http://g.csdn.net/5272873" target="_blank" onclick="LogClickCount(this,336);">iOS</a>
  545. <a title="Swift" href="http://g.csdn.net/5272868" target="_blank" onclick="LogClickCount(this,336);">Swift</a>
  546. <a title="智能硬件" href="http://g.csdn.net/5272869" target="_blank" onclick="LogClickCount(this,336);">智能硬件</a>
  547. <a title="Docker" href="http://g.csdn.net/5272867" target="_blank" onclick="LogClickCount(this,336);">Docker</a>
  548. <a title="OpenStack" href="http://g.csdn.net/5272925" target="_blank" onclick="LogClickCount(this,336);">OpenStack</a>
  549. <a title="VPN" href="http://www.csdn.net/tag/vpn" target="_blank" onclick="LogClickCount(this,336);">VPN</a>
  550. <a title="Spark" href="http://g.csdn.net/5272924" target="_blank" onclick="LogClickCount(this,336);">Spark</a>
  551. <a title="ERP" href="http://www.csdn.net/tag/erp" target="_blank" onclick="LogClickCount(this,336);">ERP</a>
  552. <a title="IE10" href="http://www.csdn.net/tag/ie10" target="_blank" onclick="LogClickCount(this,336);">IE10</a>
  553. <a title="Eclipse" href="http://www.csdn.net/tag/eclipse" target="_blank" onclick="LogClickCount(this,336);">Eclipse</a>
  554. <a title="CRM" href="http://www.csdn.net/tag/crm" target="_blank" onclick="LogClickCount(this,336);">CRM</a>
  555. <a title="JavaScript" href="http://www.csdn.net/tag/javascript" target="_blank" onclick="LogClickCount(this,336);">JavaScript</a>
  556. <a title="数据库" href="http://www.csdn.net/tag/%E6%95%B0%E6%8D%AE%E5%BA%93" target="_blank" onclick="LogClickCount(this,336);">数据库</a>
  557. <a title="Ubuntu" href="http://www.csdn.net/tag/ubuntu" target="_blank" onclick="LogClickCount(this,336);">Ubuntu</a>
  558. <a title="NFC" href="http://www.csdn.net/tag/nfc" target="_blank" onclick="LogClickCount(this,336);">NFC</a>
  559. <a title="WAP" href="http://www.csdn.net/tag/wap" target="_blank" onclick="LogClickCount(this,336);">WAP</a>
  560. <a title="jQuery" href="http://www.csdn.net/tag/jquery" target="_blank" onclick="LogClickCount(this,336);">jQuery</a>
  561. <a title="BI" href="http://www.csdn.net/tag/bi" target="_blank" onclick="LogClickCount(this,336);">BI</a>
  562. <a title="HTML5" href="http://www.csdn.net/tag/html5" target="_blank" onclick="LogClickCount(this,336);">HTML5</a>
  563. <a title="Spring" href="http://www.csdn.net/tag/spring" target="_blank" onclick="LogClickCount(this,336);">Spring</a>
  564. <a title="Apache" href="http://www.csdn.net/tag/apache" target="_blank" onclick="LogClickCount(this,336);">Apache</a>
  565. <a title=".NET" href="http://www.csdn.net/tag/.net" target="_blank" onclick="LogClickCount(this,336);">.NET</a>
  566. <a title="API" href="http://www.csdn.net/tag/api" target="_blank" onclick="LogClickCount(this,336);">API</a>
  567. <a title="HTML" href="http://www.csdn.net/tag/html" target="_blank" onclick="LogClickCount(this,336);">HTML</a>
  568. <a title="SDK" href="http://www.csdn.net/tag/sdk" target="_blank" onclick="LogClickCount(this,336);">SDK</a>
  569. <a title="IIS" href="http://www.csdn.net/tag/iis" target="_blank" onclick="LogClickCount(this,336);">IIS</a>
  570. <a title="Fedora" href="http://www.csdn.net/tag/fedora" target="_blank" onclick="LogClickCount(this,336);">Fedora</a>
  571. <a title="XML" href="http://www.csdn.net/tag/xml" target="_blank" onclick="LogClickCount(this,336);">XML</a>
  572. <a title="LBS" href="http://www.csdn.net/tag/lbs" target="_blank" onclick="LogClickCount(this,336);">LBS</a>
  573. <a title="Unity" href="http://www.csdn.net/tag/unity" target="_blank" onclick="LogClickCount(this,336);">Unity</a>
  574. <a title="Splashtop" href="http://www.csdn.net/tag/splashtop" target="_blank" onclick="LogClickCount(this,336);">Splashtop</a>
  575. <a title="UML" href="http://www.csdn.net/tag/uml" target="_blank" onclick="LogClickCount(this,336);">UML</a>
  576. <a title="components" href="http://www.csdn.net/tag/components" target="_blank" onclick="LogClickCount(this,336);">components</a>
  577. <a title="Windows Mobile" href="http://www.csdn.net/tag/windowsmobile" target="_blank" onclick="LogClickCount(this,336);">Windows Mobile</a>
  578. <a title="Rails" href="http://www.csdn.net/tag/rails" target="_blank" onclick="LogClickCount(this,336);">Rails</a>
  579. <a title="QEMU" href="http://www.csdn.net/tag/qemu" target="_blank" onclick="LogClickCount(this,336);">QEMU</a>
  580. <a title="KDE" href="http://www.csdn.net/tag/kde" target="_blank" onclick="LogClickCount(this,336);">KDE</a>
  581. <a title="Cassandra" href="http://www.csdn.net/tag/cassandra" target="_blank" onclick="LogClickCount(this,336);">Cassandra</a>
  582. <a title="CloudStack" href="http://www.csdn.net/tag/cloudstack" target="_blank" onclick="LogClickCount(this,336);">CloudStack</a>
  583. <a title="FTC" href="http://www.csdn.net/tag/ftc" target="_blank" onclick="LogClickCount(this,336);">FTC</a>
  584. <a title="coremail" href="http://www.csdn.net/tag/coremail" target="_blank" onclick="LogClickCount(this,336);">coremail</a>
  585. <a title="OPhone " href="http://www.csdn.net/tag/ophone" target="_blank" onclick="LogClickCount(this,336);">OPhone </a>
  586. <a title="CouchBase" href="http://www.csdn.net/tag/couchbase" target="_blank" onclick="LogClickCount(this,336);">CouchBase</a>
  587. <a title="云计算" href="http://www.csdn.net/tag/%E4%BA%91%E8%AE%A1%E7%AE%97" target="_blank" onclick="LogClickCount(this,336);">云计算</a>
  588. <a title="iOS6" href="http://www.csdn.net/tag/iOS6" target="_blank" onclick="LogClickCount(this,336);">iOS6</a>
  589. <a title="Rackspace " href="http://www.csdn.net/tag/rackspace" target="_blank" onclick="LogClickCount(this,336);">Rackspace </a>
  590. <a title="Web App" href="http://www.csdn.net/tag/webapp" target="_blank" onclick="LogClickCount(this,336);">Web App</a>
  591. <a title="SpringSide" href="http://www.csdn.net/tag/springside" target="_blank" onclick="LogClickCount(this,336);">SpringSide</a>
  592. <a title="Maemo" href="http://www.csdn.net/tag/maemo" target="_blank" onclick="LogClickCount(this,336);">Maemo</a>
  593. <a title="Compuware" href="http://www.csdn.net/tag/compuware" target="_blank" onclick="LogClickCount(this,336);">Compuware</a>
  594. <a title="大数据" href="http://www.csdn.net/tag/%E5%A4%A7%E6%95%B0%E6%8D%AE" target="_blank" onclick="LogClickCount(this,336);">大数据</a>
  595. <a title="aptech" href="http://www.csdn.net/tag/aptech" target="_blank" onclick="LogClickCount(this,336);">aptech</a>
  596. <a title="Perl" href="http://www.csdn.net/tag/perl" target="_blank" onclick="LogClickCount(this,336);">Perl</a>
  597. <a title="Tornado" href="http://www.csdn.net/tag/tornado" target="_blank" onclick="LogClickCount(this,336);">Tornado</a>
  598. <a title="Ruby" href="http://www.csdn.net/tag/ruby" target="_blank" onclick="LogClickCount(this,336);">Ruby</a>
  599. <a title="Hibernate" href="http://www.csdn.net/hibernate" target="_blank" onclick="LogClickCount(this,336);">Hibernate</a>
  600. <a title="ThinkPHP" href="http://www.csdn.net/tag/thinkphp" target="_blank" onclick="LogClickCount(this,336);">ThinkPHP</a>
  601. <a title="HBase" href="http://www.csdn.net/tag/hbase" target="_blank" onclick="LogClickCount(this,336);">HBase</a>
  602. <a title="Pure" href="http://www.csdn.net/tag/pure" target="_blank" onclick="LogClickCount(this,336);">Pure</a>
  603. <a title="Solr" href="http://www.csdn.net/tag/solr" target="_blank" onclick="LogClickCount(this,336);">Solr</a>
  604. <a title="Angular" href="http://www.csdn.net/tag/angular" target="_blank" onclick="LogClickCount(this,336);">Angular</a>
  605. <a title="Cloud Foundry" href="http://www.csdn.net/tag/cloudfoundry" target="_blank" onclick="LogClickCount(this,336);">Cloud Foundry</a>
  606. <a title="Redis" href="http://www.csdn.net/tag/redis" target="_blank" onclick="LogClickCount(this,336);">Redis</a>
  607. <a title="Scala" href="http://www.csdn.net/tag/scala" target="_blank" onclick="LogClickCount(this,336);">Scala</a>
  608. <a title="Django" href="http://www.csdn.net/tag/django" target="_blank" onclick="LogClickCount(this,336);">Django</a>
  609. <a title="Bootstrap" href="http://www.csdn.net/tag/bootstrap" target="_blank" onclick="LogClickCount(this,336);">Bootstrap</a>
  610. </div>
  611. </div>
  612. <div class="clear">
  613. </div>
  614. </div>
  615. </div>
  616. <div id="side">
  617. <div class="side">
  618. <div id="panel_Category" class="panel">
  619. <ul class="panel_head"><span>博客专栏</span></ul>
  620. <ul class="panel_body" id="sp_column">
  621. <table cellpadding="0" cellspacing="0"><tbody><tr>
  622. <td style="padding:10px 10px 0 0;">
  623. <a href="http://blog.csdn.net/column/details/webgis.html" target="_blank"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/20120906093633278.jpg" style="width:75px;height:75px;"></a>
  624. </td>
  625. <td style="padding:10px 0; vertical-align:top;">
  626. <a href="http://blog.csdn.net/column/details/webgis.html" target="_blank">ArcGIS API for Silverlight开发</a>
  627. <p>文章:34篇</p>
  628. <span>阅读:48309</span>
  629. </td>
  630. </tr></tbody></table>
  631. </ul>
  632. </div><div id="custom_column_22258520" class="panel">
  633. <ul class="panel_head"><span>.NET SL GIS开发群</span></ul>
  634. <ul class="panel_body">
  635. 欢迎大家加入群,交流分享GIS开发的点点滴滴,
  636. 共同进步!
  637. 群号:106887513
  638. </ul>
  639. </div><div id="panel_Profile" class="panel">
  640. <ul class="panel_head"><span>个人资料</span></ul>
  641. <ul class="panel_body profile">
  642. <div id="blog_userface">
  643. <a href="http://my.csdn.net/taomanman" target="_blank">
  644. <img src="./asp.net SQL Server 存储过程分页及代码调用 _files/1_taomanman.jpg" title="访问我的空间" style="max-width:90%">
  645. </a>
  646. <br>
  647. <span><a href="http://my.csdn.net/taomanman" class="user_name" target="_blank">暖枫无敌</a></span>
  648. </div>
  649. <div class="interact">
  650. <a href="javascript:void(0);" class="attent" id="span_add_follow" title="[加关注]" onclick="_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_guanzhu&#39;])"></a>
  651. <a href="javascript:void(0);" class="letter" title="[发私信]" onclick="window.open(&#39;http://msg.csdn.net/letters/model?receiver=taomanman&#39;,&#39;_blank&#39;,&#39;height=350,width=700&#39;);_gaq.push([&#39;_trackEvent&#39;,&#39;function&#39;, &#39;onclick&#39;, &#39;blog_articles_sixin&#39;])"></a>
  652. </div>
  653. <div id="blog_medal">
  654. <div class="ico_expert" title="CSDN认证专家"></div>
  655. <div id="bms_box"><a href="http://medal.blog.csdn.net/allmedal.aspx" target="_blank"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/columnstar_s.gif" onmouseover="m_over_m(this,0)" onmouseout="m_out_m()" alt=""></a><a href="http://medal.blog.csdn.net/allmedal.aspx" target="_blank"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/holdon_s2.gif" onmouseover="m_over_m(this,1)" onmouseout="m_out_m()" alt=""></a></div></div>
  656. <ul id="blog_rank">
  657. <li>访问:<span>389768次</span></li>
  658. <li>积分:<span>8111分</span></li>
  659. <li>排名:<span>第645名</span></li>
  660. </ul>
  661. <ul id="blog_statistics">
  662. <li>原创:<span>414篇</span></li>
  663. <li>转载:<span>55篇</span></li>
  664. <li>译文:<span>2篇</span></li>
  665. <li>评论:<span>253条</span></li>
  666. </ul>
  667. </ul>
  668. </div>
  669. <div id="custom_column_25772635" class="panel">
  670. <ul class="panel_head"><span>链接分享</span></ul>
  671. <ul class="panel_body">
  672. <a href="http://un.zhubajie.com/r/?u=5611932&l=https://login.zhubajie.com/register/">点击查看</a>
  673. </ul>
  674. </div><div class="panel" id="panel_Search">
  675. <ul class="panel_head"><span>文章搜索</span></ul>
  676. <ul class="panel_body">
  677. <form id="frmSearch" action="http://so.csdn.net/search" class="form_search" target="_blank">
  678. <span><input id="inputSearch" type="text" class="blogsearch" title="请输入关键字"></span>
  679. <input id="btnSubmit" type="button" value="搜索" title="search in blog">
  680. <input type="hidden" name="q" id="inputQ">
  681. <input type="hidden" name="t" value="blog">
  682. <a id="btnSearchBlog" target="_blank"></a>
  683. </form>
  684. </ul>
  685. </div>
  686. <script type="text/javascript">
  687. $(function () {
  688. $("#btnSubmit").click(function () {
  689. search();
  690. });
  691. $("#frmSearch").submit(function () {
  692. search();
  693. return false;
  694. });
  695. function search()
  696. {
  697. var url = "http://so.csdn.net/so/search/s.do?q=" + encodeURIComponent($("#inputSearch").val()) + "&u=" + username + "&t=blog";
  698. window.location.href = url;
  699. }
  700. });
  701. </script><div id="panel_Archive" class="panel">
  702. <ul class="panel_head"><span>文章存档</span></ul>
  703. <ul class="panel_body">
  704. <div id="archive_list"><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/09">2014年09月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/08">2014年08月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/07">2014年07月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/06">2014年06月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/05">2014年05月</a><span>(3)</span></li><span class="hidelist" style="display:none;"><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/04">2014年04月</a><span>(6)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/03">2014年03月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/02">2014年02月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2014/01">2014年01月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/12">2013年12月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/11">2013年11月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/10">2013年10月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/09">2013年09月</a><span>(6)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/08">2013年08月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/07">2013年07月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/05">2013年05月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/04">2013年04月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/03">2013年03月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/02">2013年02月</a><span>(10)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2013/01">2013年01月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/12">2012年12月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/11">2012年11月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/10">2012年10月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/09">2012年09月</a><span>(8)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/08">2012年08月</a><span>(8)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/07">2012年07月</a><span>(17)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/06">2012年06月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/05">2012年05月</a><span>(16)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/04">2012年04月</a><span>(12)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/03">2012年03月</a><span>(16)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/02">2012年02月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2012/01">2012年01月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/12">2011年12月</a><span>(27)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/11">2011年11月</a><span>(15)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/10">2011年10月</a><span>(14)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/09">2011年09月</a><span>(17)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/08">2011年08月</a><span>(17)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/07">2011年07月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/06">2011年06月</a><span>(10)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/05">2011年05月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/04">2011年04月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/03">2011年03月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/02">2011年02月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2011/01">2011年01月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/12">2010年12月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/11">2010年11月</a><span>(8)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/10">2010年10月</a><span>(6)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/09">2010年09月</a><span>(23)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/08">2010年08月</a><span>(9)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/07">2010年07月</a><span>(24)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/06">2010年06月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/05">2010年05月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/04">2010年04月</a><span>(11)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/03">2010年03月</a><span>(5)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/02">2010年02月</a><span>(2)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2010/01">2010年01月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/12">2009年12月</a><span>(7)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/11">2009年11月</a><span>(3)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/10">2009年10月</a><span>(6)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/09">2009年09月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/08">2009年08月</a><span>(4)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2009/07">2009年07月</a><span>(1)</span></li><li><a href="http://blog.csdn.net/zdw_wym/article/month/2008/12">2008年12月</a><span>(1)</span></li></span><div id="archive_list_button" class="list_closed">展开</div></div>
  705. </ul>
  706. </div>
  707. <div id="hotarticls" class="panel">
  708. <ul class="panel_head">
  709. <span>
  710. 阅读排行 </span>
  711. </ul>
  712. <ul class="panel_body itemlist">
  713. <li>
  714. <a href="http://blog.csdn.net/zdw_wym/article/details/6325853" title="(三)、使用HighCharts创建第一个图表实例">(三)、使用HighCharts创建第一个图表实例</a><span>(15620)</span>
  715. </li>
  716. <li>
  717. <a href="http://blog.csdn.net/zdw_wym/article/details/6325942" title="(四)、读取数据库数据并在HighCharts上显示">(四)、读取数据库数据并在HighCharts上显示</a><span>(11988)</span>
  718. </li>
  719. <li>
  720. <a href="http://blog.csdn.net/zdw_wym/article/details/6233930" title="asp.net页面显示word文档内容">asp.net页面显示word文档内容</a><span>(7560)</span>
  721. </li>
  722. <li>
  723. <a href="http://blog.csdn.net/zdw_wym/article/details/6942186" title="(五)、利用HighCharts 显示饼图">(五)、利用HighCharts 显示饼图</a><span>(6965)</span>
  724. </li>
  725. <li>
  726. <a href="http://blog.csdn.net/zdw_wym/article/details/7937391" title="ArcGIS API for Silverlight 调用GP服务准备---GP模型建立、发布、测试">ArcGIS API for Silverlight 调用GP服务准备---GP模型建立、发布、测试</a><span>(5286)</span>
  727. </li>
  728. <li>
  729. <a href="http://blog.csdn.net/zdw_wym/article/details/8025509" title="ArcGIS中利用ArcMap将地理坐标系转换成投影坐标系(从WKID=4326到WKID=102100)">ArcGIS中利用ArcMap将地理坐标系转换成投影坐标系(从WKID=4326到WKID=102100)</a><span>(5171)</span>
  730. </li>
  731. <li>
  732. <a href="http://blog.csdn.net/zdw_wym/article/details/6325684" title="(二)、HighCharts图表js库结构介绍及下载">(二)、HighCharts图表js库结构介绍及下载</a><span>(3896)</span>
  733. </li>
  734. <li>
  735. <a href="http://blog.csdn.net/zdw_wym/article/details/5910199" title="Repeater控件用法----一列数据在Repeater中每行显示固定记录方法">Repeater控件用法----一列数据在Repeater中每行显示固定记录方法</a><span>(3479)</span>
  736. </li>
  737. <li>
  738. <a href="http://blog.csdn.net/zdw_wym/article/details/5994943" title="图片锁定,防止连接">图片锁定,防止连接</a><span>(3383)</span>
  739. </li>
  740. <li>
  741. <a href="http://blog.csdn.net/zdw_wym/article/details/8019687" title="ArcGIS API for Silverlight中加载Google地形图(瓦片图)">ArcGIS API for Silverlight中加载Google地形图(瓦片图)</a><span>(3352)</span>
  742. </li>
  743. </ul>
  744. </div>
  745. <div id="hotarticls2" class="panel">
  746. <ul class="panel_head"><span>评论排行</span></ul>
  747. <ul class="panel_body itemlist">
  748. <li>
  749. <a href="http://blog.csdn.net/zdw_wym/article/details/6233930" title="asp.net页面显示word文档内容">asp.net页面显示word文档内容</a><span>(28)</span>
  750. </li>
  751. <li>
  752. <a href="http://blog.csdn.net/zdw_wym/article/details/7937391" title="ArcGIS API for Silverlight 调用GP服务准备---GP模型建立、发布、测试">ArcGIS API for Silverlight 调用GP服务准备---GP模型建立、发布、测试</a><span>(17)</span>
  753. </li>
  754. <li>
  755. <a href="http://blog.csdn.net/zdw_wym/article/details/6325853" title="(三)、使用HighCharts创建第一个图表实例">(三)、使用HighCharts创建第一个图表实例</a><span>(17)</span>
  756. </li>
  757. <li>
  758. <a href="http://blog.csdn.net/zdw_wym/article/details/6325942" title="(四)、读取数据库数据并在HighCharts上显示">(四)、读取数据库数据并在HighCharts上显示</a><span>(14)</span>
  759. </li>
  760. <li>
  761. <a href="http://blog.csdn.net/zdw_wym/article/details/6989076" title="asp.net 操作Excel表数据导入到SQL Server数据库">asp.net 操作Excel表数据导入到SQL Server数据库</a><span>(12)</span>
  762. </li>
  763. <li>
  764. <a href="http://blog.csdn.net/zdw_wym/article/details/7937879" title="ArcGIS API for Silverlight 调用GP服务加载等值线图层">ArcGIS API for Silverlight 调用GP服务加载等值线图层</a><span>(11)</span>
  765. </li>
  766. <li>
  767. <a href="http://blog.csdn.net/zdw_wym/article/details/7354103" title="ArcGIS API for Silverlight 中根据坐标点在地图上打标记">ArcGIS API for Silverlight 中根据坐标点在地图上打标记</a><span>(11)</span>
  768. </li>
  769. <li>
  770. <a href="http://blog.csdn.net/zdw_wym/article/details/5591433" title="利用Lucene.net实现检索并对检索关键字高亮显示">利用Lucene.net实现检索并对检索关键字高亮显示</a><span>(9)</span>
  771. </li>
  772. <li>
  773. <a href="http://blog.csdn.net/zdw_wym/article/details/8482975" title="WPF库存管理系统界面(仿360UI风格)">WPF库存管理系统界面(仿360UI风格)</a><span>(9)</span>
  774. </li>
  775. <li>
  776. <a href="http://blog.csdn.net/zdw_wym/article/details/6415520" title="利用WebService自定义显示天气情况">利用WebService自定义显示天气情况</a><span>(6)</span>
  777. </li>
  778. </ul>
  779. </div>
  780. <div id="homepageArticles" class="panel tracking-ad" data-mod="popu_4">
  781. <ul class="panel_head"><span>推荐文章</span></ul>
  782. <ul class="panel_body" id="ad_commend"><iframe id="ad_frm_2" frameborder="0" scrolling="no" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ad.htm" style="border-width: 0px; overflow: hidden; width: 194px; height: 200px;"></iframe></ul>
  783. </div>
  784. <script type="text/javascript">
  785. new Ad(12, 'ad_commend');
  786. </script><div id="newcomments" class="panel">
  787. <ul class="panel_head"><span>最新评论</span></ul>
  788. <ul class="panel_body itemlist">
  789. <li>
  790. <a href="http://blog.csdn.net/zdw_wym/article/details/7012754#comments">jquery ajax数据操作 DropDownList级联</a>
  791. <p style="margin:0px;"><a href="http://blog.csdn.net/ironxue" class="user_name">ironxue</a>:
  792. 很有用的东西,向楼主学习。
  793. </p>
  794. </li>
  795. <li>
  796. <a href="http://blog.csdn.net/zdw_wym/article/details/7013466#comments">Session容易丢失的一些常见解决办法</a>
  797. <p style="margin:0px;"><a href="http://blog.csdn.net/ironxue" class="user_name">ironxue</a>:
  798. 不太懂,不过感觉很实用的东西。顶楼主。
  799. </p>
  800. </li>
  801. <li>
  802. <a href="http://blog.csdn.net/zdw_wym/article/details/7616605#comments">ArcGIS API for Silverlight 鼠标移动显示地理坐标</a>
  803. <p style="margin:0px;"><a href="http://blog.csdn.net/yundeyi" class="user_name">yundeyi</a>:
  804. 搞定了。谢谢您。
  805. </p>
  806. </li>
  807. <li>
  808. <a href="http://blog.csdn.net/zdw_wym/article/details/6325853#comments">(三)、使用HighCharts创建第一个图表实例</a>
  809. <p style="margin:0px;"><a href="http://blog.csdn.net/zjj972326230" class="user_name">zjj972326230</a>:
  810. 请问一下,我想把第一个柱状图最下面那个 人数 那个方块去掉怎么改代码呢,谢谢啊
  811. </p>
  812. </li>
  813. <li>
  814. <a href="http://blog.csdn.net/zdw_wym/article/details/6325853#comments">ArcGIS API for Silverlight 鼠标移动显示地理坐标</a>
  815. <p style="margin:0px;"><a href="http://blog.csdn.net/taomanman" class="user_name">暖枫无敌</a>:
  816. @yundeyi:这个就是xaml页面中的一个TextBlock控件的x:Name值
  817. </p>
  818. </li>
  819. <li>
  820. <a href="http://blog.csdn.net/zdw_wym/article/details/6325853#comments">ArcGIS API for Silverlight 鼠标移动显示地理坐标</a>
  821. <p style="margin:0px;"><a href="http://blog.csdn.net/yundeyi" class="user_name">yundeyi</a>:
  822. 请问下,MapCoordsTextBlock是在哪里声明的?
  823. </p>
  824. </li>
  825. <li>
  826. <a href="http://blog.csdn.net/zdw_wym/article/details/5758067#comments">Silverlight调用自定义的Web Service从数据库获取数据进行页面绑定</a>
  827. <p style="margin:0px;"><a href="http://blog.csdn.net/sdkj10" class="user_name">sdkj10</a>:
  828. 能发一下源码吗?739000230@qq.com
  829. </p>
  830. </li>
  831. <li>
  832. <a href="http://blog.csdn.net/zdw_wym/article/details/7469594#comments">ArcGIS API for Silverlight 点击地图弹出自定义窗体</a>
  833. <p style="margin:0px;"><a href="http://blog.csdn.net/taolinyan092" class="user_name">taolinyan092</a>:
  834. 大神getData1SoapClient在哪
  835. </p>
  836. </li>
  837. <li>
  838. <a href="http://blog.csdn.net/zdw_wym/article/details/7469594#comments">ArcGIS API for Silverlight 点击地图弹出自定义窗体</a>
  839. <p style="margin:0px;"><a href="http://blog.csdn.net/taolinyan092" class="user_name">taolinyan092</a>:
  840. 大神你那个小旗子是自己添得吗
  841. </p>
  842. </li>
  843. <li>
  844. <a href="http://blog.csdn.net/zdw_wym/article/details/7469594#comments">ArcGIS API for Silverlight 点击地图弹出自定义窗体</a>
  845. <p style="margin:0px;"><a href="http://blog.csdn.net/taolinyan092" class="user_name">taolinyan092</a>:
  846. 大神你using MapClient.ServiceReference1; 是添加了那个引用啊
  847. </p>
  848. </li>
  849. </ul>
  850. </div>
  851. <div id="custom_column_5674097" class="panel">
  852. <ul class="panel_head"><span>友情链接</span></ul>
  853. <ul class="panel_body">
  854. <br>
  855. 1、<a href="http://xpi8.com/" title="郭新" target="_blank">雪海流浪</a> <br>
  856. 2、<a href="http://www.asp.net/cn" title="微软ASP.NET官网" target="_blank">微软ASP.NET官网</a>
  857. <br>
  858. 3、<a href="http://sourceforge.net/projects/pdfbox/" title="处理PDF文档组件" target="_blank">处理PDF文档组件</a>
  859. <br>
  860. 4、<a href="http://www.slfans.com/Silverlight/" title="Silverlight Fans" target="_blank">Silverlight Fans</a>
  861. <br>
  862. 5、<a href="http://blogs.msdn.com/b/silverlight/archive/2009/11/09/announcing-the-new-microsoft-sdk-for-facebook-platform.aspx" title="Silverlight Team Blog" target="_blank">Silverlight Team Blog</a>
  863. <br>
  864. 6、<a href="http://www.jfree.org/" title="jfree 图表" target="_blank">jfree 图表</a> <br>
  865. 7、<a href="http://www.cnblogs.com/chenkai/" title="博客园" target="_blank">博客园 chenkai</a>
  866. <br>
  867. 8、<a href="http://www.effiproz.com/SL4QTDemo.aspx" title="Effiproz Embeded C# DataBase" target="_blank">Effiproz Embeded C# DataBase</a>
  868. <br>
  869. </ul>
  870. </div> </div>
  871. <div class="clear">
  872. </div>
  873. </div>
  874. <div class="clear">
  875. </div>
  876. </div>
  877. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/cnick.js"></script>
  878. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/newblog.min.js"></script>
  879. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/showblogmedal.ashx"></script>
  880. <script type="text/javascript">
  881. document.write('<script type="text/javascript" src="http://csdnimg.cn/pubfooter/js/publib_footer.js?' + Math.floor(new Date() / 120000).toString(36) + '="></' + 'script>');
  882. </script><script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/publib_footer.js"></script><link rel="stylesheet" type="text/css" href="./asp.net SQL Server 存储过程分页及代码调用 _files/pub_footer_2012.css"><div id="pub_footerall" class="pub_footerall"><dl><dt></dt> <dd><a href="http://www.csdn.net/company/about.html" target="_blank">公司简介</a>|<a href="http://www.csdn.net/company/recruit.html" target="_blank">招贤纳士</a>|<a href="http://www.csdn.net/company/marketing.html" target="_blank">广告服务</a>|<a href="http://www.csdn.net/company/account.html" target="_blank">银行汇款帐号</a>|<a href="http://www.csdn.net/company/contact.html" target="_blank">联系方式</a>|<a href="http://www.csdn.net/company/statement.html" target="_blank">版权声明</a>|<a href="http://www.csdn.net/company/layer.html" target="_blank">法律顾问</a>|<a href="mailto:webmaster@csdn.net">问题报告</a>|<a target="_blank" href="http://www.csdn.net/friendlink.html">合作伙伴</a>|<a href="http://bbs.csdn.net/forums/Service" target="_blank">论坛反馈</a></dd><dd><a href="http://wpa.qq.com/msgrd?v=3&uin=2355263776&site=qq&menu=yes" target="_blank" class="qq">网站客服</a> <a href="http://wpa.qq.com/msgrd?v=3&uin=2251809102&site=qq&menu=yes" target="_blank" class="qq">杂志客服</a> <a href="http://e.weibo.com/csdnsupport/profile" target="_blank" class="weibo">微博客服</a> <a href="mailto:webmaster@csdn.net" class="email" title="联系邮箱">webmaster@csdn.net</a> <span class="phone" title="服务热线">400-600-2320</span></dd><dd>京&nbsp;ICP&nbsp;证&nbsp;070598&nbsp;号</dd><dd>北京创新乐知信息技术有限公司 版权所有</dd><dd>江苏乐知网络技术有限公司 提供商务支持</dd><dd>Copyright © 1999-2014, CSDN.NET, All Rights Reserved&nbsp;<a href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010" target="_blank"><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/gongshang_logos.gif" alt="GongshangLogo" title=""></a></dd></dl></div><div id="note1" class="csdn_note" style="display:none; position:absolute; z-index:9999; width:440px"> <span class="notice_top_arrow"><span class="inner"></span></span> <div class="box"></div></div><div class="csdn_notice_tip" style="display: none; position: absolute; z-index: 9990; width: 170px;"> <iframe src="about:blank" frameborder="0" scrolling="no" style="z-index:-1;position:absolute;top:0;left:0;width:100%;height:100%;background:transparent"></iframe> <div class="tip_text">您有<strong>0</strong>条新通知</div> <a href="javascript:void 0" class="close2"></a></div><script id="noticeScript" type="text/javascript" btnid="header_notice_num" wrapid="note1" count="5" subcount="5" src="./asp.net SQL Server 存储过程分页及代码调用 _files/notify.js"></script>
  883. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/login.js"></script>
  884. <script type="text/javascript">document.write("<img src=http://counter.csdn.net/pv.aspx?id=24 border=0 width=0 height=0>");</script><img src="./asp.net SQL Server 存储过程分页及代码调用 _files/pv.aspx" border="0" width="0" height="0">
  885. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/counter.js"></script><script type="text/javascript" charset="UTF-8" src="./asp.net SQL Server 存储过程分页及代码调用 _files/msg.popup.js"></script>
  886. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/ad-blog.js"></script>
  887. <script type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/count.js"></script><iframe src="./asp.net SQL Server 存储过程分页及代码调用 _files/logs.htm" frameborder="0" width="0" height="0"></iframe>
  888. <script type="text/javascript">
  889. $(function () {
  890. function __get_code_toolbar(snippet_id) {
  891. return $("<a href='https://code.csdn.net/snippets/"
  892. + snippet_id
  893. + "' target='_blank' title='在CODE上查看代码片' style='text-indent:0;'><img src='https://code.csdn.net/assets/CODE_ico.png' width=12 height=12 alt='在CODE上查看代码片' style='position:relative;top:1px;left:2px;'/></a>"
  894. + "<a href='https://code.csdn.net/snippets/"
  895. + snippet_id
  896. + "/fork' target='_blank' title='派生到我的代码片' style='text-indent:0;'><img src='https://code.csdn.net/assets/ico_fork.svg' width=12 height=12 alt='派生到我的代码片' style='position:relative;top:2px;left:2px;'/></a>");
  897. }
  898. $("[code_snippet_id]").each(function () {
  899. __s_id = $(this).attr("code_snippet_id");
  900. if (__s_id != null && __s_id != "" && __s_id != 0 && parseInt(__s_id) > 70020) {
  901. __code_tool = __get_code_toolbar(__s_id);
  902. $(this).prev().find(".tools").append(__code_tool);
  903. }
  904. });
  905. });
  906. </script>
  907. </div>
  908. <!--new top-->
  909. <script id="csdn-toolbar-id" btnid="header_notice_num" wrapid="note1" count="5" subcount="5" type="text/javascript" src="./asp.net SQL Server 存储过程分页及代码调用 _files/toolbar.js"></script>
  910. <!--new top-->
  911. <div id="tag-suggest-pop">
  912. <div class="relative">
  913. <div class="close"></div>
  914. <div class="content"></div>
  915. </div>
  916. </div></body></html>