﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Happiness...</title><link>http://www.cnblogs.com/guolichun/</link><description /><language>zh-cn</language><lastBuildDate>Sun, 12 Oct 2008 07:54:29 GMT</lastBuildDate><pubDate>Sun, 12 Oct 2008 07:54:29 GMT</pubDate><ttl>60</ttl><item><title>数据库分页存储过程</title><link>http://www.cnblogs.com/guolichun/archive/2008/05/12/1193878.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Mon, 12 May 2008 08:31:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/05/12/1193878.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1193878.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/05/12/1193878.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1193878.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1193878.html</trackback:ping><description><![CDATA[数据库分页存储过程<BR><BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 4px; FONT-SIZE: 13px; BORDER-TOP: #cccccc 1px solid; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><SPAN style="COLOR: #0000ff">SET</SPAN><SPAN style="COLOR: #000000">&nbsp;QUOTED_IDENTIFIER&nbsp;</SPAN><SPAN style="COLOR: #0000ff">ON</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">GO</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">SET</SPAN><SPAN style="COLOR: #000000">&nbsp;ANSI_NULLS&nbsp;</SPAN><SPAN style="COLOR: #0000ff">ON</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">GO</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG id=Codehighlighter1_58_145_Open_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_58_145_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_58_145_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_58_145_Closed_Text').style.display='inline';" align=top src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockStart.gif"><IMG style="DISPLAY: none" id=Codehighlighter1_58_145_Closed_Image onclick="this.style.display='none'; document.getElementById('Codehighlighter1_58_145_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_58_145_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_58_145_Open_Text').style.display='inline';" align=top src="http://www.cnblogs.com/images/OutliningIndicators/ContractedBlock.gif"></SPAN><SPAN style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; DISPLAY: none; BACKGROUND-COLOR: #ffffff" id=Codehighlighter1_58_145_Closed_Text>/**/</SPAN><SPAN id=Codehighlighter1_58_145_Open_Text><SPAN style="COLOR: #008080">/*</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif">名&nbsp;&nbsp;&nbsp;&nbsp;称:&nbsp;pr_Common_PagedSelect<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif">功&nbsp;&nbsp;&nbsp;&nbsp;能:&nbsp;获取指定页的数据<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif">创建标识：2008-05-12&nbsp;15:30<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif">修改标识：<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/InBlock.gif">修改原因：<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/ExpandedBlockEnd.gif"></SPAN><SPAN style="COLOR: #008080">*/</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">CREATE&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">PROCEDURE</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">[</SPAN><SPAN style="COLOR: #ff0000">dbo</SPAN><SPAN style="COLOR: #ff0000">]</SPAN><SPAN style="COLOR: #000000">.pr_Common_PagedSelect<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">),&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;表名</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">),&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;排序字段名</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@SelectedFields</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">255</SPAN><SPAN style="COLOR: #000000">),&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;选择字段名</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;页尺寸</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@PageIndex</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;页码</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderType</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bit</SPAN><SPAN style="COLOR: #000000">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;设置排序类型,&nbsp;非&nbsp;0&nbsp;值则降序</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">2000</SPAN><SPAN style="COLOR: #000000">)&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;查询条件&nbsp;(注意:&nbsp;不要加&nbsp;where)</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">AS</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">declare</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strSQL</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">6000</SPAN><SPAN style="COLOR: #000000">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;主语句</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">declare</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1000</SPAN><SPAN style="COLOR: #000000">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;临时变量</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">declare</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">500</SPAN><SPAN style="COLOR: #000000">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">&nbsp;排序类型</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderType</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">0</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">begin</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&lt;(select&nbsp;min</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;order&nbsp;by&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;desc</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">begin</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&gt;(select&nbsp;max</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;order&nbsp;by&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;asc</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strSQL</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">select&nbsp;top&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">str</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@SelectedFields</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;from&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;where&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">([</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">])&nbsp;from&nbsp;(select&nbsp;top&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">str</SPAN><SPAN style="COLOR: #000000">((</SPAN><SPAN style="COLOR: #008000">@PageIndex</SPAN><SPAN style="COLOR: #808080">-</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #808080">*</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;from&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">)&nbsp;as&nbsp;tblTmp)</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">''</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">Begin</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strSQL</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">select&nbsp;top&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">str</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@SelectedFields</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;from&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;where&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">([</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">])&nbsp;from&nbsp;(select&nbsp;top&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">str</SPAN><SPAN style="COLOR: #000000">((</SPAN><SPAN style="COLOR: #008000">@PageIndex</SPAN><SPAN style="COLOR: #808080">-</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #808080">*</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@OrderField</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;from&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]&nbsp;where&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">)&nbsp;as&nbsp;tblTmp)&nbsp;and&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">End</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@PageIndex</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">begin</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">''</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">''</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;where&nbsp;(</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@Condition</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">)</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strSQL</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">select&nbsp;top&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff00ff">str</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #008000">@PageSize</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@SelectedFields</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;from&nbsp;[</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TableName</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">]</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strTmp</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">@strOrder</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">end</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">exec</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #008000">@strSQL</SPAN><SPAN style="COLOR: #000000">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008080">--</SPAN><SPAN style="COLOR: #008080">获取记录集</SPAN><SPAN style="COLOR: #008080"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">GO</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">SET</SPAN><SPAN style="COLOR: #000000">&nbsp;QUOTED_IDENTIFIER&nbsp;</SPAN><SPAN style="COLOR: #0000ff">OFF</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">GO</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">SET</SPAN><SPAN style="COLOR: #000000">&nbsp;ANSI_NULLS&nbsp;</SPAN><SPAN style="COLOR: #0000ff">ON</SPAN><SPAN style="COLOR: #000000">&nbsp;<BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">GO</SPAN><SPAN style="COLOR: #000000"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"><BR><IMG align=top src="http://www.cnblogs.com/images/OutliningIndicators/None.gif"></SPAN></DIV><img src ="http://www.cnblogs.com/guolichun/aggbug/1193878.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42950/" target="_blank">[新闻]Google开拓美政府机构市场 微软业务受冲击</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>css + div 实现左右div区域高度自动适应</title><link>http://www.cnblogs.com/guolichun/archive/2008/04/25/1171179.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Fri, 25 Apr 2008 07:43:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/25/1171179.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1171179.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/25/1171179.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1171179.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1171179.html</trackback:ping><description><![CDATA[摘要: 1&lt;!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;2&lt;htmlxmlns="http://www.w3.org/1999/xhtml"&gt;3&lt;head&gt;4&lt;title&gt;div&nbsp;&nbsp;<a href='http://www.cnblogs.com/guolichun/archive/2008/04/25/1171179.html'>阅读全文</a><img src ="http://www.cnblogs.com/guolichun/aggbug/1171179.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42949/" target="_blank">[新闻]消息称苹果正在开发iTunes网络电视</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>C#中处理字符串和数字 </title><link>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169660.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Thu, 24 Apr 2008 09:23:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169660.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1169660.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169660.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1169660.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1169660.html</trackback:ping><description><![CDATA[<P><FONT color=#808080 size=3>在CSDN上有人问：C#中有没有判断一个string类型变量是否为数字类型的系统函数(如vb中的IsNumeric(s))？<BR>答案肯定是没有的。有人提议用int.Parse(string)的方法，然后通过捕获异常来判断返回的值。更好的方法是用正则表达式：</FONT><BR><BR></P>
<H2>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 4px; FONT-SIZE: 13px; BORDER-TOP: #cccccc 1px solid; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN>&nbsp;<SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;IsNumeric(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;str)<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN>&nbsp;<SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">3</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i;<BR></SPAN><SPAN style="COLOR: #008080">4</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(str&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">&amp;&amp;</SPAN><SPAN style="COLOR: #000000">&nbsp;Regex.IsMatch(str,</SPAN><SPAN style="COLOR: #800000">@"</SPAN><SPAN style="COLOR: #800000">^\d+$</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">))<BR></SPAN><SPAN style="COLOR: #008080">5</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">.Parse(str);<BR></SPAN><SPAN style="COLOR: #008080">6</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">7</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">8</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;i;<BR></SPAN><SPAN style="COLOR: #008080">9</SPAN>&nbsp;<SPAN style="COLOR: #000000">}</SPAN></DIV></H2>
<DIV class=postText>
<P><BR>&nbsp;</P>
<P>这应该是个好办法。不过如果要提出更高的要求，例如不仅要判断字符串是否全为数字，还要在判断后，要求将其进行转换。那么上述函数就有缺陷，因为在上面的正则表达式中无法判断‘-’符号。因此上面的函数只能转换非负数。尤有甚者，要求转换的不仅是整数，还包括浮点数，尤其是科学计数法的字符串，例如：string s = "-3.14159E+10"<BR></P>
<P>这里面的'E'、'.'、'+'等字符，都是比较特殊的，而且还要求它们出现的位置要符合浮点数或科学计数方法的规定。那么就不能使用正则表达式了，至少很麻烦（我是这样认为的，或许有好的方法）。问题还是回到最初的解决方案，就是使用Parse（）方法和捕获异常。以下是实现此功能的方法：<BR></P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 4px; FONT-SIZE: 13px; BORDER-TOP: #cccccc 1px solid; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN>&nbsp;<SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;IsNumeric(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;s,&nbsp;</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">&nbsp;result)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN>&nbsp;<SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;bReturn&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">.Parse(s);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bReturn&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;bReturn;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN>&nbsp;<SPAN style="COLOR: #000000">}<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN>&nbsp;<SPAN style="COLOR: #000000">例如调用：<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN>&nbsp;<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;s1</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">abc</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;s2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">-3.14159E+10</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">&nbsp;d1,d2;<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;ty1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;IsNumeric(s1,</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">&nbsp;d1);<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000">&nbsp;ty2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;IsNumeric(s2,</SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000">&nbsp;d2);<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN>&nbsp;<SPAN style="COLOR: #000000">结果：<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN>&nbsp;<SPAN style="COLOR: #000000">ty1</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;d1</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN>&nbsp;<SPAN style="COLOR: #000000">ty2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;d2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">31415900000</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">25</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN></DIV>
<P><BR><BR>说明：因为涉及到浮点数，就不能使用-1来做为出现错误的返回值，如前面的例子。也就是说本方法有两个返回值，一个是判断转换是否成功，为bool型；另一个是转换成功后的浮点数值。我用out来解决该问题。<BR></P>
<P>本方法仍然适合整型，只需对返回值进行强制转换即可。</P></DIV><img src ="http://www.cnblogs.com/guolichun/aggbug/1169660.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42948/" target="_blank">[新闻]微软周一开电话会议 预计将发布Silverlight2.0</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>ConvertTo.cs 强制转换类</title><link>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169622.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Thu, 24 Apr 2008 08:58:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169622.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1169622.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169622.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1169622.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1169622.html</trackback:ping><description><![CDATA[摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;45namespaceChinaValue.CommonV20086{7/**////&lt;summary&gt;8///将字符串转换成任意其他数据9///&lt;/summary&gt;10publicstaticclassConvertStr11{12/**////&nbsp;&nbsp;<a href='http://www.cnblogs.com/guolichun/archive/2008/04/24/1169622.html'>阅读全文</a><img src ="http://www.cnblogs.com/guolichun/aggbug/1169622.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42948/" target="_blank">[新闻]微软周一开电话会议 预计将发布Silverlight2.0</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>Validator.cs 验证类</title><link>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169613.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Thu, 24 Apr 2008 08:55:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169613.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1169613.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169613.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1169613.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1169613.html</trackback:ping><description><![CDATA[摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Text.RegularExpressions;56namespaceChinaValue.CommonV20087{8/**////&lt;summary&gt;9///各种数据检测的逻辑10///&lt;/summary&gt;11publi&nbsp;&nbsp;<a href='http://www.cnblogs.com/guolichun/archive/2008/04/24/1169613.html'>阅读全文</a><img src ="http://www.cnblogs.com/guolichun/aggbug/1169613.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42948/" target="_blank">[新闻]微软周一开电话会议 预计将发布Silverlight2.0</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>Request 操作类</title><link>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169607.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Thu, 24 Apr 2008 08:54:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169607.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1169607.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169607.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1169607.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1169607.html</trackback:ping><description><![CDATA[摘要: Request1usingSystem;2usingSystem.Web;3usingSystem.Text;4usingSystem.Text.RegularExpressions;56namespaceChinaValue.CommonV20087{8/**////&lt;summary&gt;9///Request操作类10///&lt;/summary&gt;11publicclassCV&nbsp;&nbsp;<a href='http://www.cnblogs.com/guolichun/archive/2008/04/24/1169607.html'>阅读全文</a><img src ="http://www.cnblogs.com/guolichun/aggbug/1169607.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42948/" target="_blank">[新闻]微软周一开电话会议 预计将发布Silverlight2.0</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item><item><title>Utility常用功能类 MD5 ClientIP JS弹窗消息</title><link>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169544.html</link><dc:creator>Happiness...</dc:creator><author>Happiness...</author><pubDate>Thu, 24 Apr 2008 08:28:00 GMT</pubDate><guid>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169544.html</guid><wfw:comment>http://www.cnblogs.com/guolichun/comments/1169544.html</wfw:comment><comments>http://www.cnblogs.com/guolichun/archive/2008/04/24/1169544.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/guolichun/comments/commentRss/1169544.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/guolichun/services/trackbacks/1169544.html</trackback:ping><description><![CDATA[摘要: UTILITYUtility1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingMicrosoft.Practices.EnterpriseLibrary.Logging;5usingSystem.Security.Cryptography;6usingSystem.Web;7usingSystem.Colle&nbsp;&nbsp;<a href='http://www.cnblogs.com/guolichun/archive/2008/04/24/1169544.html'>阅读全文</a><img src ="http://www.cnblogs.com/guolichun/aggbug/1169544.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/42948/" target="_blank">[新闻]微软周一开电话会议 预计将发布Silverlight2.0</a><br/><a href="http://www.cnblogs.com" target="_blank">博客园首页</a>&nbsp;<a href="http://space.cnblogs.com" target="_blank">社区</a>&nbsp;<a href="http://news.cnblogs.com" target="_blank">新闻频道</a>&nbsp;<a href="http://space.cnblogs.com/group.htm" target="_blank">小组</a>&nbsp;<a href="http://space.cnblogs.com/q" target="_blank">博问</a>&nbsp;<a href="http://wz.cnblogs.com/" target="_blank">网摘</a>&nbsp;<a href="http://space.cnblogs.com/ing" target="_blank">闪存</a>]]></description></item></channel></rss>