﻿<?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>BlogJava-&lt;h1&gt;编程之道&lt;/h1&gt;-随笔分类-.NET</title><link>http://www.blogjava.net/yuanhuaming/category/2773.html</link><description>无论是批评的，赞扬的，指着的都请EMAIL给我，你的建议将是我前进的动力!   &lt;A href=mailto:yuanhuaming@56.com &gt;联系我&lt;/A&gt;</description><language>zh-cn</language><lastBuildDate>Fri, 02 Mar 2007 07:42:05 GMT</lastBuildDate><pubDate>Fri, 02 Mar 2007 07:42:05 GMT</pubDate><ttl>60</ttl><item><title>ActiveReport之事件篇 </title><link>http://www.blogjava.net/yuanhuaming/archive/2006/08/03/61492.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Thu, 03 Aug 2006 05:16:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/08/03/61492.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/61492.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/08/03/61492.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/61492.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/61492.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: SimSun">
						<span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">只触发一次的事件：</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<?XML:NAMESPACE PREFIX = O /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-bidi-font-size: 12.0pt">ReportStart</span>
				</b>
				<b>
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">在报表启动时触发。该事件在</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-bidi-font-size: 12.0pt">DataInitialize</span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">之前，在这里可以整个报表都要用到的对象或变量作初始化，也可以设置子报表。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-bidi-font-size: 12.0pt">DataInitialize</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：这个事件在前面的几篇随笔中经常出现，经常在这里取数据，绑定数据源，设置报表的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Fileds</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">属性等。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">ReportEnd </span>
				</b>
				<b>
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">在报表加载完成后触发。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: SimSun">
						<span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">多次触发的事件：</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'ＭＳ 明朝'">FetchData</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						</span>
				</b>
				<b>
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">： </span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">在处理每一条数据时都会触发，如果是采用绑定数据源的方式，就不需要再作对</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Fields</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">中每个</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Field</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Value</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">赋值。如果是从自定义的对象集合中提取数据，就要在这里给</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Fields</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">赋值。而且，使用自定义集合的时候要自己设置事件的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">eArgs</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">参数的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">EOF</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">属性，该属性用来判断是否显示到了最后一条记录，如果是，就设置为</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">true</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">，并且直接返回。具体的代码可以参看以前的随笔。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 9.0pt; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt; mso-no-proof: yes">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'ＭＳ 明朝'">PageStart</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						</span>
				</b>
				<b>
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">在报表的每页生成的时候触发，在这里作针对每个页的处理，最常见的就是显示页码。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'ＭＳ 明朝'">PageEnd</span>
				</b>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						</span>
				</b>
				<b>
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">在报表的每也生成完成的时候触发。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: SimSun">
						<span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">区域的事件：</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">每个区域（</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">PageHeader</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">，</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Detail </span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">，</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">PageFooter</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">）都有</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Format</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">，</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">BeforePrint</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">和</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">AfterPrint</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">事件。最好不要在这几个事件中操作报表的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Fields</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">集合，而应该在</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-bidi-font-size: 12.0pt">DataInitialize</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">和</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">FetchData</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">中进行。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">Format </span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-weight: bold">在数据加载并绑定后触发，只有在这里才可以设置某个区域的高度。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-weight: bold">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0mm 0mm 0pt 21pt; mso-para-margin-left: 2.0gd">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">BeforePrint</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt">：</span>
				</b>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-weight: bold">在区域被生成前触发，在这里如果设置区域的高度是不会有效果的，而且不要在这里操作数据源。</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-weight: bold">
						<o:p>
						</o:p>
				</span>
		</p>
		<b style="mso-bidi-font-weight: normal">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA">AfterPrint</span>
				<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA">：</span>
		</b>
		<span lang="ZH-CN" style="FONT-SIZE: 10pt; FONT-FAMILY: SimSun; mso-fareast-language: ZH-CN; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA">在区域已经被生成并描画出后发生，可以在该事件里直接在画布上进行描画操作。</span>
<img src ="http://www.blogjava.net/yuanhuaming/aggbug/61492.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-08-03 13:16 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/08/03/61492.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在写程序的时候，请注意特殊字符的转义~~~</title><link>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58936.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Wed, 19 Jul 2006 02:51:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58936.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/58936.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58936.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/58936.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/58936.html</trackback:ping><description><![CDATA[
		<p>前天被测试组查出来的一个BUG，就是在输入"<strong><font color="#ff1493">'</font></strong>"的时候报错了。因为数据库是ORACLE，'是关键字，所以抛了异常。<br /><br />解决方法：<br />1.可以先预编译下.<br />2.就是转义下.string.replace("<font color="#ff1493">'</font>" ,"<font color="#ff1493">''</font>")<br /><br />我认为这个BUG出的好,映像比较深刻.在今后的开发过程中,在转义方面留了一个心眼.<br /><br /><br /><br /></p>
<img src ="http://www.blogjava.net/yuanhuaming/aggbug/58936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-07-19 10:51 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58936.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多本程序同时写LOG出现的问题</title><link>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58919.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Wed, 19 Jul 2006 02:16:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58919.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/58919.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58919.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/58919.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/58919.html</trackback:ping><description><![CDATA[
		<p>结合测试的时候偶尔会出现：ネットワーク パスが見つかりません。<br />我们一开始都以为是网络的问题，但是一直都解决不了。<br />今天某人无聊测试LOG的时候，真相终于水落石出了。<br />测试环境：win2000，2本只写LOG的程序。<br />当2本程序同时写LOG到一个日志中的时候会出现上诉ERROR。<br /><br />让人很意外，写LOG居然报网络路径找不到。经验值又上升了<br /><br /><br /><br /><br /><br /></p>
<img src ="http://www.blogjava.net/yuanhuaming/aggbug/58919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-07-19 10:16 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/07/19/58919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>.net常用函数</title><link>http://www.blogjava.net/yuanhuaming/archive/2006/06/16/53154.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Fri, 16 Jun 2006 01:21:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/06/16/53154.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/53154.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/06/16/53154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/53154.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/53154.html</trackback:ping><description><![CDATA[Ucase(string) 将字符串转换为大写。 <br />Val(string) 将代表数字的字符串转换为数值型态，若字符串中含有非数字的内容则会将其去除后，合并为一数字。 <br />Weekday(date) 取的参数中的日期是一个星期的第几天，星期天为1、星期一为2、星期二为3 依此类推。 <br />WeekDayName(number) 依接收的参数取得星期的名称，可接收的参数为1 到7，星期天为1、星期一为2、星期二为3 依此类推。 <br />Split(expression[, delimiter]) 以delimiter 参数设定的条件字符串来将字符串分割为字符串数组。 <br />Sqrt(number) 取得一数值得平方根。 <br />Str(number) 将数字转为字符串后传回。 <br />StrReverse(expression) 取得字符串内容反转后的结果。 <br />Tan(number) 取得某个角度的正切值。 <br />TimeOfDay() 取得目前不包含日期的时间。 <br />Timer() 取得由0:00 到目前时间的秒数，型态为Double。 <br />TimeSerial(hour, minute, second) 将接收的参数合并为一个只有时间Date 型态的数据。 <br />Timavalue(time) 取得符合国别设定样式的时间值。 <br />Today() 取得今天不包含时间的日期。 <br />Trim(string) 去掉字符串开头和结尾的空白。 <br />TypeName(varname) 取得变量或对象的型态。 <br />Ubound(arrayname[, dimension]) 取得数组的最终索引值，dimension 参数是指定取得第几维度的最终索引值。 <br />MonthName(month) 依接收的月份数值取得该月份的完整写法。 <br />Now() 取得目前的日期和时间。 <br />Oct(number) 将数值参数转换为8 进制值。 <br />Replace(expression, find, replace) 将字符串中find 参数指定的字符串转换为replace 参数指定的字符串。 <br />Right(string,length) 由字符串右边开始取得length 参数设定长度的字符。 <br />RmDir(path) 移除一个空的目录。 <br />Rnd() 取得介于0 到1 之间的小数，如果每次都要取得不同的值，使用前需加上Randomize 叙述。 <br />Rtrim(string) 去掉字符串的右边空白部分。 <br />Second(time) 取得时间内容的秒部分，型态为Integer。 <br />Sign(number) 取得数值内容是正数或负数，正数传回1，负数传回-1，0 传回0。 <br />Sin(number) 取得一个角度的正弦值。 <br />Space(number) 取得number 参数设定的空白字符串。 <br />IsDate(expression) 判断表达式内容是否为DateTime 型态，若是则传回True，反之则为False。 <br />IsDbNull(expression) 判断表达式内容是否为Null，若是则传回True，反之则为False。 <br />IsNumeric(expression) 判断表达式内容是否为数值型态，若是则传回True，反之则为False。 <br />Join(sourcearray[, delimiter]) 将字符串数组合并唯一个字符串，delimiter 参数是设定在各个元素间加入新的字符串。 <br />Lcase(string) 将字符串转换为小写字体。 <br />Left(string, length) 由字符串左边开始取得length 参数设定长度的字符。 <br />Len(string) 取得字符串的长度。 <br />Log(number) 取得数值的自然对数。 <br />Ltrim(string) 去掉字符串的左边空白部分。 <br />Mid(string, start[, length]) 取出字符串中strat 参数设定的字符后length 长度的字符串，若length 参数没有设定，则取回start 以后全部的字符。 <br />Minute(time) 取得时间内容的分部分，型态为Integer。 <br />MkDir(path) 建立一个新的目录。 <br />Month(date) 取得日期的月部分，型态为Integer。 <br />FormatDateTime(date[,namedformat]) 传回格式化的日期或时间数据。 <br />FormatNumber(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 传回格式化 <br />的数值数据。Numdigitsafterdecimal 参数为小数字数，includeleadingdigit 参数为当整数为0 时是否补至整数字数。 <br />FormatPercent(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 传回转换为百分比格式的数值数据。numdigitsafterdecimal 参数为小数字数，includeleadingdigit 参数为当整数为0 时是否补至整数字数。 <br />GetAttr(filename) 传回档案或目录的属性值。 <br />Hex(number) 将数值参数转换为16 进制值。 <br />Hour(time) 传回时间的小时字段，型态是Integer。 <br />Iif(expression, truepart, falsepart) 当表达式的传回值为True 时执行truepart 字段的程序，反之则执行falsepart 字段。 <br />InStr([start, ]string1, string2) 搜寻string2 参数设定的字符出现在字符串的第几个字符，start 为由第几个字符开始寻找，string1 为欲搜寻的字符串，string2 为欲搜寻的字符。 <br />Int(number) 传回小于或等于接收参数的最大整数值。 <br />IsArray(varname) 判断一个变量是否为数组型态，若为数组则传回True，反之则为False。 <br />Day(datetime) 依接收的日期参数传回日。 <br />Eof(filenumber) 当抵达一个被开启的档案结尾时会传回True。 <br />Exp(number) 依接收的参数传回e 的次方值。 <br />FileDateTime(pathname) 传回档案建立时的日期、时间。 <br />FileLen(pathname) 传回档案的长度，单位是Byte。 <br />Filter(sourcearray, match[, include[, compare]]) 搜寻字符串数组中的指定字符串，凡是数组元素中含有指定字符串，会将它们结合成新的字符串数组并传回。若是要传回不含指定字符串的数组元素，则include 参数设为False。 compare 参数则是设定搜寻时是否区分大小写，此时只要给TextCompare 常数或1 即可。 <br />Fix(number) 去掉参数的小数部分并传回。 <br />Format(expression[, style[, firstdayofweek[, firstweekofyear]]]) 将日期、时间和数值资料转为每个国家都可以接受的格式。 <br />FormatCurrency(expression[,numdigitsafterdecimal [,includeleadingdigit]]) 将数值输出为金额型态。 <br />numdigitsafterdecimal 参数为小数字数，includeleadingdigit 参数为当整数为0 时是否补至整数字数。 <br />CObj(expression) 转换表达式为Object 型态。 <br />CShort(expression) 转换表达式为Short 型态。 <br />CSng(expression) 转换表达式为Single 型态。 <br />CStr(expression) 转换表达式为String 型态。 <br />Choose (index, choice-1[, choice-2, ... [, choice-n]]) 以索引值来选择并传回所设定的参数。 <br />Chr(charcode) 以ASCII 码来取得字符内容。 <br />Close(filenumberlist) 结束使用Open 开启的档案。 <br />Cos(number) 取得一个角度的余弦值。 <br />Ctype(expression, typename) 转换表达式的型态。 <br />DateAdd(dateinterval, number, datetime) 对日期或时间作加减。 <br />DateDiff(dateinterval, date1, date2) 计算两个日期或时间间的差值。 <br />DatePart (dateinterval, date) 依接收的日期或时间参数传回年、月、日或时间。 <br />DateSerial(year, month, day) 将接收的参数合并为一个只有日期的Date 型态的数据。 <br />Datevalue(datetime) 取得符合国别设定样式的日期值，并包含时间。 <br />Abs(number) 取得数值的绝对值。 <br />Asc(String) 取得字符串表达式的第一个字符ASCII 码。 <br />Atn(number) 取得一个角度的反正切值。 <br />CallByName (object, procname, usecalltype,[args()]) 执行一个对象的方法、设定或传回对象的属性。 <br />CBool(expression) 转换表达式为Boolean 型态。 <br />CByte(expression) 转换表达式为Byte 型态。 <br />CChar(expression) 转换表达式为字符型态。 <br />CDate(expression) 转换表达式为Date 型态。 <br />CDbl(expression) 转换表达式为Double 型态。 <br />CDec(expression) 转换表达式为Decimal 型态。 <br />CInt(expression) 转换表达式为Integer 型态。 <br />CLng(expression) 转换表达式为Long 型态 <img src ="http://www.blogjava.net/yuanhuaming/aggbug/53154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-06-16 09:21 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/06/16/53154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自己在一个项目使用到的DBUntil类</title><link>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51663.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Fri, 09 Jun 2006 04:24:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51663.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/51663.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51663.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/51663.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/51663.html</trackback:ping><description><![CDATA[
		<p>
				<br />先看下<a href="http://www.qihangnet.com/ct.ashx?id=2c34d77c-7c8f-4c44-b067-1664702d795c&amp;url=http%3a%2f%2fwww.ineta.org%2f" target="_blank" ?=""><font color="#003399">INETA</font></a>牛人Stephen Walther的比较测试结论.希望对大家有用</p>
		<ul>
				<li>DataReadear比DataSet快15% 
</li>
				<li>SqlDataReader比OleDbDataReader快50% 
</li>
				<li>用DataReader的ASP风格的表格显示比DataGrid绑定DataReader快60% 
</li>
				<li>用Ordinal的DataReader访问字段比用名字访问快15% 
</li>
				<li>DataGrid中用AutoGenerateColumns=true比用显式绑定快24% 
</li>
				<li>尽量用缓存</li>
		</ul>
		<p>测试由于比较局限，所以不一定很准确，但可以做个参考。<br /></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; 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: #0000ff">Imports</span>
				<span style="COLOR: #000000"> System.Data.OleDb<br /><br /><br /></span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Class</span>
				<span style="COLOR: #000000"> ComDataBase<br /><br />    </span>
				<span style="COLOR: #0000ff">Private</span>
				<span style="COLOR: #000000"> LsConn </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">         <br /></span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Private</span>
				<span style="COLOR: #000000"> LoleConn </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbConnection         </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Private</span>
				<span style="COLOR: #000000"> LoleTrans </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbTransaction        </span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000">()<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> bOracle </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Boolean</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">False</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oIni </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> ComIniFile(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">..\INI\CCCC001.ini</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br /><br />        </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (oIni.GetValue(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DB</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DBTYPE</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">) </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">ORACLE</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />            bOracle </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">True</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />
						<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> sServer </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> oIni.GetValue(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DB</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">SERVERNAME</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">) <br /><br /></span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> sDBName </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> oIni.GetValue(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DB</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DBNAME</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)      </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> sUser </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> oIni.GetValue(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DB</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">USER</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)          </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> sPsw </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> oIni.GetValue(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">DB</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">PASSWORD</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)       </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (bOracle) </span>
				<span style="COLOR: #0000ff">Then<br /></span>
				<span style="COLOR: #000000">            LsConn </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Provider=OraOLEDB.Oracle;Data Source=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sDBName _<br />                    </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;User Id=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sUser </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;Password=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sPsw </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;OLEDB.NET=true</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Else</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #000000">LsConn </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Provider=sqloledb;Data Source=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sServer </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;Initial Catalog=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> _<br />                     </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sDBName </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;User Id=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sUser </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;Password=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> sPsw </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />
						<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">'db open<br /></span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> Open()<br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">            </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #0000ff">Not</span>
				<span style="COLOR: #000000"> (LoleConn </span>
				<span style="COLOR: #0000ff">Is</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Nothing</span>
				<span style="COLOR: #000000">)) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />      </span>
				<span style="COLOR: #000000">                </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (LoleConn.State </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> ConnectionState.Open) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />                    </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'接続文字列は定義しない文字列</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">                    </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (LoleConn.ConnectionString </span>
				<span style="COLOR: #000000">&lt;&gt;</span>
				<span style="COLOR: #000000"> LsConn) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />                        LoleConn.Close()<br />                        LoleConn.ConnectionString </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LsConn<br />                        LoleConn.Open()<br />                    </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />                </span>
				<span style="COLOR: #0000ff">Else</span>
				<span style="COLOR: #000000">
						<br />                    </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'接続文字列は定義しない文字列</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">                    </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (LoleConn.ConnectionString </span>
				<span style="COLOR: #000000">&lt;&gt;</span>
				<span style="COLOR: #000000"> LsConn) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />                        LoleConn.ConnectionString </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LsConn<br />                    </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />                    LoleConn.Open()<br />                </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #0000ff">Else</span>
				<span style="COLOR: #000000">
						<br />                LoleConn </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbConnection(LsConn)<br />                LoleConn.Open()<br />            </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Catch</span>
				<span style="COLOR: #000000"> ex </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> Exception<br />            ComLog.SetErrLog(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">ComDataBase</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Open</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">データベースの接続に失敗しました。</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000"> ex.Message)<br />            ComMsgBox.ErrMsg(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">E-0002</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> Close()<br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'データ ソースへの接続を閉じする</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">            </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #0000ff">Not</span>
				<span style="COLOR: #000000"> (LoleConn </span>
				<span style="COLOR: #0000ff">Is</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Nothing</span>
				<span style="COLOR: #000000">)) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />                LoleConn.Close()<br />            </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Catch</span>
				<span style="COLOR: #000000"> ex </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> Exception<br />            ComLog.SetErrLog(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">ComDataBase</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Close</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, ex.Message)<br />        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'対象を解放する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">            </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #0000ff">Not</span>
				<span style="COLOR: #000000"> (LoleConn </span>
				<span style="COLOR: #0000ff">Is</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Nothing</span>
				<span style="COLOR: #000000">)) </span>
				<span style="COLOR: #0000ff">Then</span>
				<span style="COLOR: #000000">
						<br />                LoleConn.Dispose()<br />                LoleConn </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Nothing</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">If</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> BeginTrans()<br />        </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'トランザクションを開始する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        LoleTrans </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleConn.BeginTransaction()<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> Commit()<br />        Execute(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Delete システム管理 where 1=2</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br />        </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'トランザクションの終点をマークする</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        LoleTrans.Commit()<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Sub</span>
				<span style="COLOR: #000000"> RollBack()<br />        Execute(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Delete システム管理 where 1=2</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br />        </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'データ変更を消去する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        LoleTrans.Rollback()<br />    </span>
				<span style="COLOR: #0000ff">End Sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Function</span>
				<span style="COLOR: #000000"> GetDataSet(</span>
				<span style="COLOR: #0000ff">ByVal</span>
				<span style="COLOR: #000000"> sSQL </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">) </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> DataSet<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleAdapter </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbDataAdapter<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oDataSet </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> DataSet </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> DataSet<br /><br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleCommand </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbCommand(sSQL, LoleConn)<br />            oleCommand.Transaction </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleTrans<br />            oleAdapter </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbDataAdapter(oleCommand)<br />            oleAdapter.Fill(oDataSet)               </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'SQL文を検索する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            oleAdapter.Dispose()                    </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'対象を解放</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Return</span>
				<span style="COLOR: #000000"> oDataSet<br />    </span>
				<span style="COLOR: #0000ff">End Function</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Function</span>
				<span style="COLOR: #000000"> Query(</span>
				<span style="COLOR: #0000ff">ByVal</span>
				<span style="COLOR: #000000"> sSQL </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">) </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbDataReader<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleCommand </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbCommand(sSQL, LoleConn)<br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Transaction </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleTrans<br />            </span>
				<span style="COLOR: #0000ff">Return</span>
				<span style="COLOR: #000000"> oleCommand.ExecuteReader()       </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'SQL文を検索する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Dispose()                    </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'対象を解放</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Function</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Function</span>
				<span style="COLOR: #000000"> Query(</span>
				<span style="COLOR: #0000ff">ByVal</span>
				<span style="COLOR: #000000"> sSQL </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #0000ff">ByRef</span>
				<span style="COLOR: #000000"> aryOleDbParameter </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> ArrayList) </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbDataReader<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleCommand </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbCommand(sSQL, LoleConn)<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleParam </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbParameter<br /><br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Transaction </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleTrans<br /><br />            </span>
				<span style="COLOR: #0000ff">For</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Each</span>
				<span style="COLOR: #000000"> oleParam </span>
				<span style="COLOR: #0000ff">In</span>
				<span style="COLOR: #000000"> aryOleDbParameter<br />                oleCommand.Parameters.Add(oleParam)<br />            </span>
				<span style="COLOR: #0000ff">Next</span>
				<span style="COLOR: #000000">
						<br />            </span>
				<span style="COLOR: #0000ff">Return</span>
				<span style="COLOR: #000000"> oleCommand.ExecuteReader()       </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'SQL文を検索する</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Dispose()                    </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'対象を解放</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Function</span>
				<span style="COLOR: #000000">
						<br />
						<br />
				</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Function</span>
				<span style="COLOR: #000000"> Execute(</span>
				<span style="COLOR: #0000ff">ByVal</span>
				<span style="COLOR: #000000"> sSQL </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">) </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Integer</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleCommand </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbCommand(sSQL, LoleConn)   </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">'OleDbCommandの新インスタンス</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Transaction </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleTrans<br />            </span>
				<span style="COLOR: #0000ff">Return</span>
				<span style="COLOR: #000000"> oleCommand.ExecuteNonQuery()     </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Dispose()                    </span>
				<span style="COLOR: #000000">       <br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Function</span>
				<span style="COLOR: #000000">
						<br />
						<br /> </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">Public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Function</span>
				<span style="COLOR: #000000"> Execute(</span>
				<span style="COLOR: #0000ff">ByVal</span>
				<span style="COLOR: #000000"> sSQL </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">String</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #0000ff">ByRef</span>
				<span style="COLOR: #000000"> aryOleDbParameter </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> ArrayList) </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Integer</span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleCommand </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">New</span>
				<span style="COLOR: #000000"> OleDbCommand(sSQL, LoleConn)   </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Dim</span>
				<span style="COLOR: #000000"> oleParam </span>
				<span style="COLOR: #0000ff">As</span>
				<span style="COLOR: #000000"> OleDbParameter<br />        </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Transaction </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> LoleTrans<br /><br />            </span>
				<span style="COLOR: #0000ff">For</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Each</span>
				<span style="COLOR: #000000"> oleParam </span>
				<span style="COLOR: #0000ff">In</span>
				<span style="COLOR: #000000"> aryOleDbParameter<br />                oleCommand.Parameters.Add(oleParam)<br />            </span>
				<span style="COLOR: #0000ff">Next</span>
				<span style="COLOR: #000000">
						<br />
						<br />            </span>
				<span style="COLOR: #0000ff">Return</span>
				<span style="COLOR: #000000"> oleCommand.ExecuteNonQuery()     </span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #000000">        </span>
				<span style="COLOR: #0000ff">Finally</span>
				<span style="COLOR: #000000">
						<br />            oleCommand.Dispose()  <br /></span>
				<span style="COLOR: #000000">
						<br />        </span>
				<span style="COLOR: #0000ff">End</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">Try</span>
				<span style="COLOR: #000000">
						<br />    </span>
				<span style="COLOR: #0000ff">End Function</span>
				<span style="COLOR: #000000">
						<br />
				</span>
		</div>
		<p>基本功能都有了，对于小项目而言，这个类够用了。<br /> </p>
<img src ="http://www.blogjava.net/yuanhuaming/aggbug/51663.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-06-09 12:24 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51663.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转一篇封装ADO的代码</title><link>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51639.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Fri, 09 Jun 2006 03:11:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51639.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/51639.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51639.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/51639.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/51639.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: using				 System;				using				 System.Collections;				using				 System.Collections.Specialized;				using				 System.Runtime.Remoting.Messaging;				using				 System.Data;				using...&nbsp;&nbsp;<a href='http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51639.html'>阅读全文</a><img src ="http://www.blogjava.net/yuanhuaming/aggbug/51639.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2006-06-09 11:11 <a href="http://www.blogjava.net/yuanhuaming/archive/2006/06/09/51639.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于DataGrid分页问题 </title><link>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10278.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Tue, 16 Aug 2005 10:21:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10278.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/10278.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10278.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/10278.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/10278.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我总在别人面前夸VS.NET是这么的智能，是多么的为“民工”着想。他对程序员的关照绝对不亚于牛哥对织女的痴情。前天碰到了一个分页的问题，本来以为只要添加几个属性就搞定了，没想到不行。那天心里特别烦躁（估计太热的关系），我搞了好久也没搞定。一气之下去洗了把澡，突然想到我干吗不网上找答案？靠，我平时找资料很勤快的，怎么今天反映这么迟钝。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一会儿，我就找到答案了，错就错在我太相信VS.NET的智能了。dataGrid虽然提供了翻页的功能，但是不太智能，需要你通过一个事件把新页设置成当年页。<BR><BR>这是datashow显示部分，注意一定要再&lt;form&gt;内<BR>&lt;asp:datagrid id="dataShow" Runat="server" OnPageIndexChanged="dataShow_Changed" AllowPaging=True PageSize=2 PagerStyle-HorizontalAlign=Right Width=100%&gt;&lt;/asp:datagrid&gt;<BR><BR>代码如下：<BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;OleDbConnection&nbsp;conn;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strcon;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strcmd;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;System.Web.UI.WebControls.Label&nbsp;label1;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OleDbDataAdapter&nbsp;cmd;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSet&nbsp;ds;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;Page_Load(</SPAN><SPAN style="COLOR: #0000ff">object</SPAN><SPAN style="COLOR: #000000">&nbsp;sender,&nbsp;System.EventArgs&nbsp;e)<BR><IMG id=Codehighlighter1_209_907_Open_Image onclick="this.style.display='none'; Codehighlighter1_209_907_Open_Text.style.display='none'; Codehighlighter1_209_907_Closed_Image.style.display='inline'; Codehighlighter1_209_907_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_209_907_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_209_907_Closed_Text.style.display='none'; Codehighlighter1_209_907_Open_Image.style.display='inline'; Codehighlighter1_209_907_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_209_907_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_209_907_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strcon</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Provider=microsoft.jet.oledb.4.0;data&nbsp;source=c:\\inetpub\\wwwroot\\Flowers\\FlowerDB.mdb</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;OleDbConnection(strcon);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strcmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">select&nbsp;FlowerName,FlowerPrice&nbsp;from&nbsp;Flowers&nbsp;where&nbsp;FlowerTypeID=(select&nbsp;FlowerTypeID&nbsp;from&nbsp;FlowerType&nbsp;where&nbsp;FlowerTypeName=@name)</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;OleDbDataAdapter(strcmd,conn);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.SelectCommand.Parameters.Add(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;OleDbParameter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">@name</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;OleDbType.Char,</SPAN><SPAN style="COLOR: #000000">80</SPAN><SPAN style="COLOR: #000000">));<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.SelectCommand.Parameters[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">@name</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">].Value</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">Session[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">name</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">];<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ds</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd.Fill(ds,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Flowers</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataShow.DataSource</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">ds.Tables[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Flowers</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">].DefaultView;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataShow.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label1.Text</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">一共有</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">ds.Tables[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Flowers</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">].Rows.Count.ToString()</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">条记录。</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">这个事件就是当用户选择改变当前页的索引时，就把新页的索引作为当前页的索引，同时需要再次绑定</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;dataShow_Changed(Object&nbsp;sender,&nbsp;DataGridPageChangedEventArgs&nbsp;e)<BR><IMG id=Codehighlighter1_1037_1116_Open_Image onclick="this.style.display='none'; Codehighlighter1_1037_1116_Open_Text.style.display='none'; Codehighlighter1_1037_1116_Closed_Image.style.display='inline'; Codehighlighter1_1037_1116_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_1037_1116_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1037_1116_Closed_Text.style.display='none'; Codehighlighter1_1037_1116_Open_Image.style.display='inline'; Codehighlighter1_1037_1116_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_1037_1116_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1037_1116_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataShow.CurrentPageIndex&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;e.NewPageIndex;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataShow.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV><BR><BR><img src ="http://www.blogjava.net/yuanhuaming/aggbug/10278.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2005-08-16 18:21 <a href="http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10278.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ADO.NET学习笔记2</title><link>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10242.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Tue, 16 Aug 2005 08:36:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10242.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/10242.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10242.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/10242.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/10242.html</trackback:ping><description><![CDATA[－－－－－－－[b]ADO.NET中的数据绑定[/b]－－－－－－－－－－－<BR>&nbsp;&nbsp;&nbsp; 要实现通过控件来访问数据库数据，必须从数据库检索数据。数据绑定是将检索到的数据与显示该数据的控件进行链接的过程。使用数据绑定表达式可将数据绑定到所有类型的控件中。使用DataSource属性可以将数据绑定到复杂控件中，如DataList,DataGrid.....（不过今天主要讲如何使用绑定式）<BR>&nbsp;&nbsp;&nbsp; 可以从各类型的数据执行数据绑定操作，如：<BR><BR>1.简单属性<BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_3_46_Open_Image onclick="this.style.display='none'; Codehighlighter1_3_46_Open_Text.style.display='none'; Codehighlighter1_3_46_Closed_Image.style.display='inline'; Codehighlighter1_3_46_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_3_46_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_3_46_Closed_Text.style.display='none'; Codehighlighter1_3_46_Open_Image.style.display='inline'; Codehighlighter1_3_46_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_3_46_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_3_46_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Import&nbsp;Namespace</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">System.Web.UI.WebControls&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_52_76_Open_Image onclick="this.style.display='none'; Codehighlighter1_52_76_Open_Text.style.display='none'; Codehighlighter1_52_76_Closed_Image.style.display='inline'; Codehighlighter1_52_76_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_52_76_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_52_76_Closed_Text.style.display='none'; Codehighlighter1_52_76_Open_Image.style.display='inline'; Codehighlighter1_52_76_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_52_76_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_52_76_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Import&nbsp;Namespace</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">System&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">HTML</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">HEAD</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">test</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_156_232_Open_Image onclick="this.style.display='none'; Codehighlighter1_156_232_Open_Text.style.display='none'; Codehighlighter1_156_232_Closed_Image.style.display='inline'; Codehighlighter1_156_232_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_156_232_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_156_232_Closed_Text.style.display='none'; Codehighlighter1_156_232_Open_Image.style.display='inline'; Codehighlighter1_156_232_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">script&nbsp;</SPAN><SPAN style="COLOR: #ff0000">language</SPAN><SPAN style="COLOR: #0000ff">="C#"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;runat</SPAN><SPAN style="COLOR: #0000ff">="server"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN id=Codehighlighter1_156_232_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_156_232_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">void</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Txt_Changed(Object&nbsp;sender,EventArgs&nbsp;e)<BR><IMG id=Codehighlighter1_205_229_Open_Image onclick="this.style.display='none'; Codehighlighter1_205_229_Open_Text.style.display='none'; Codehighlighter1_205_229_Closed_Image.style.display='inline'; Codehighlighter1_205_229_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_205_229_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_205_229_Closed_Text.style.display='none'; Codehighlighter1_205_229_Open_Image.style.display='inline'; Codehighlighter1_205_229_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_205_229_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_205_229_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;Page.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;</SPAN></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">HEAD</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">form&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">=form1&nbsp;</SPAN><SPAN style="COLOR: #ff0000">runat</SPAN><SPAN style="COLOR: #0000ff">=server&gt;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">&lt;asp:TextBox&nbsp;ID</SPAN><SPAN style="COLOR: #0000ff">="txtBox"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;OnTextChanged</SPAN><SPAN style="COLOR: #0000ff">="Txt_Changed"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;Runat</SPAN><SPAN style="COLOR: #0000ff">="server"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">br</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">asp:Label&nbsp;</SPAN><SPAN style="COLOR: #ff0000">ID</SPAN><SPAN style="COLOR: #0000ff">=lblShow&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">Runat</SPAN><SPAN style="COLOR: #0000ff">=server&gt;&lt;%#&nbsp;</SPAN><SPAN style="COLOR: #ff0000">txtBox.Text&nbsp;%</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">asp:Label</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">form</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">HTML</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></DIV><BR>2.集合&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //已经在上次讲过了，就是将数据绑定到ArrayList中的例子<BR>3.表达式<BR>4.方法调用的结果<BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG id=Codehighlighter1_2_26_Open_Image onclick="this.style.display='none'; Codehighlighter1_2_26_Open_Text.style.display='none'; Codehighlighter1_2_26_Closed_Image.style.display='inline'; Codehighlighter1_2_26_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_2_26_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2_26_Closed_Text.style.display='none'; Codehighlighter1_2_26_Open_Image.style.display='inline'; Codehighlighter1_2_26_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_2_26_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_2_26_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Import&nbsp;Namespace</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">System&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_32_75_Open_Image onclick="this.style.display='none'; Codehighlighter1_32_75_Open_Text.style.display='none'; Codehighlighter1_32_75_Closed_Image.style.display='inline'; Codehighlighter1_32_75_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_32_75_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_32_75_Closed_Text.style.display='none'; Codehighlighter1_32_75_Open_Image.style.display='inline'; Codehighlighter1_32_75_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_32_75_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_32_75_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Import&nbsp;Namespace</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">System.Web.UI.WebControls&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_81_110_Open_Image onclick="this.style.display='none'; Codehighlighter1_81_110_Open_Text.style.display='none'; Codehighlighter1_81_110_Closed_Image.style.display='inline'; Codehighlighter1_81_110_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_81_110_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_81_110_Closed_Text.style.display='none'; Codehighlighter1_81_110_Open_Image.style.display='inline'; Codehighlighter1_81_110_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_81_110_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_81_110_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Import&nbsp;Namespace</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">System.Data&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">HTML</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">HEAD</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">test</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">title</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_190_633_Open_Image onclick="this.style.display='none'; Codehighlighter1_190_633_Open_Text.style.display='none'; Codehighlighter1_190_633_Closed_Image.style.display='inline'; Codehighlighter1_190_633_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_190_633_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_190_633_Closed_Text.style.display='none'; Codehighlighter1_190_633_Open_Image.style.display='inline'; Codehighlighter1_190_633_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">script&nbsp;</SPAN><SPAN style="COLOR: #ff0000">language</SPAN><SPAN style="COLOR: #0000ff">="C#"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;runat</SPAN><SPAN style="COLOR: #0000ff">="server"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN id=Codehighlighter1_190_633_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_190_633_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">void</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;Page_Load(Object&nbsp;sender,EventArgs&nbsp;e)<BR><IMG id=Codehighlighter1_237_537_Open_Image onclick="this.style.display='none'; Codehighlighter1_237_537_Open_Text.style.display='none'; Codehighlighter1_237_537_Closed_Image.style.display='inline'; Codehighlighter1_237_537_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_237_537_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_237_537_Closed_Text.style.display='none'; Codehighlighter1_237_537_Open_Image.style.display='inline'; Codehighlighter1_237_537_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_237_537_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_237_537_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">!</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">IsPostBack)<BR><IMG id=Codehighlighter1_261_533_Open_Image onclick="this.style.display='none'; Codehighlighter1_261_533_Open_Text.style.display='none'; Codehighlighter1_261_533_Closed_Image.style.display='inline'; Codehighlighter1_261_533_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_261_533_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_261_533_Closed_Text.style.display='none'; Codehighlighter1_261_533_Open_Image.style.display='inline'; Codehighlighter1_261_533_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_261_533_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_261_533_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;DataTable&nbsp;dt</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;DataTable(</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">num</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;dt.Columns.Add(</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;DataColumn(</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">数字</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">,</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">typeof</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(Int32)));<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;DataRow&nbsp;dr;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">for</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">int</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;i</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;i</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&lt;</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">10</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;i</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">++</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)<BR><IMG id=Codehighlighter1_404_472_Open_Image onclick="this.style.display='none'; Codehighlighter1_404_472_Open_Text.style.display='none'; Codehighlighter1_404_472_Closed_Image.style.display='inline'; Codehighlighter1_404_472_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_404_472_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_404_472_Closed_Text.style.display='none'; Codehighlighter1_404_472_Open_Image.style.display='inline'; Codehighlighter1_404_472_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_404_472_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_404_472_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dr</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">dt.NewRow();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dr[</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">]</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">i;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dt.Rows.Add(dr);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;DataView.DataSource</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">dt;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;DataView.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;String&nbsp;square(</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">int</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;a)<BR><IMG id=Codehighlighter1_564_630_Open_Image onclick="this.style.display='none'; Codehighlighter1_564_630_Open_Text.style.display='none'; Codehighlighter1_564_630_Closed_Image.style.display='inline'; Codehighlighter1_564_630_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_564_630_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_564_630_Closed_Text.style.display='none'; Codehighlighter1_564_630_Open_Image.style.display='inline'; Codehighlighter1_564_630_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_564_630_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_564_630_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">int</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;num</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">a</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">*</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">a;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">return</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;num.ToString();</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">返回类型是string，所以要转类型</SPAN><SPAN style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;</SPAN></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">HEAD</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">form&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="form1"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;runat</SPAN><SPAN style="COLOR: #0000ff">="server"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">asp:DataList&nbsp;</SPAN><SPAN style="COLOR: #ff0000">ID</SPAN><SPAN style="COLOR: #0000ff">=DataView&nbsp;</SPAN><SPAN style="COLOR: #ff0000">Runat</SPAN><SPAN style="COLOR: #0000ff">=server&gt;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #ff0000">&lt;!--&nbsp;&nbsp;ItemTemplate其实是DataList中的模板，功能是为数据集合中的每一行呈现一次。还有其它模板请看MSDN--</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">ItemTemplate</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;下面既采用了表达式，有用了方法调用。还介绍了DataBinder.Eval()方法，有3个参数：<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;1。数据项的命名容器：Container.DataItem<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;2。数据字段名(列名)<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;3。格式字符串，可选&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_964_1006_Open_Image onclick="this.style.display='none'; Codehighlighter1_964_1006_Open_Text.style.display='none'; Codehighlighter1_964_1006_Closed_Image.style.display='inline'; Codehighlighter1_964_1006_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_964_1006_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_964_1006_Closed_Text.style.display='none'; Codehighlighter1_964_1006_Open_Image.style.display='inline'; Codehighlighter1_964_1006_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;数字：</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_964_1006_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_964_1006_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">#&nbsp;DataBinder.</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">Eval</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(Container.DataItem,</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">数字</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1019_1074_Open_Image onclick="this.style.display='none'; Codehighlighter1_1019_1074_Open_Text.style.display='none'; Codehighlighter1_1019_1074_Closed_Image.style.display='inline'; Codehighlighter1_1019_1074_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_1019_1074_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1019_1074_Closed_Text.style.display='none'; Codehighlighter1_1019_1074_Open_Image.style.display='inline'; Codehighlighter1_1019_1074_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;平方：</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</SPAN><SPAN id=Codehighlighter1_1019_1074_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1019_1074_Open_Text><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">#&nbsp;square((</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">int</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)DataBinder.</SPAN><SPAN style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">Eval</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(Container.DataItem,</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">数字</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">))&nbsp;</SPAN></SPAN><SPAN style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">ItemTemplate</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">asp:DataList</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">form</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">body</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">HTML</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></DIV><BR><BR><img src ="http://www.blogjava.net/yuanhuaming/aggbug/10242.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2005-08-16 16:36 <a href="http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10242.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ADO.NET学习笔记1</title><link>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10239.html</link><dc:creator>疯流成性</dc:creator><author>疯流成性</author><pubDate>Tue, 16 Aug 2005 08:31:00 GMT</pubDate><guid>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10239.html</guid><wfw:comment>http://www.blogjava.net/yuanhuaming/comments/10239.html</wfw:comment><comments>http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10239.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/yuanhuaming/comments/commentRss/10239.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/yuanhuaming/services/trackbacks/10239.html</trackback:ping><description><![CDATA[<P>ADO.NET拥有2大核心组件：<BR>a.DataSet<BR>b..net数据提供程序<BR><IMG src="http://photo.blogchina.com/data1/2005-6-21/001/134/277/14629/14629_l.jpg"><BR>其中DataSet不与数据库交互，它只是一个数据容器。与数据库打交道的式.net数据提供程序。</P>
<P>下面我门来看3段代码：<BR><BR>1.如何把表添加到DataSet中<BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;DataSet&nbsp;ds</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;DataTable&nbsp;dt</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataTable(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">num</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;dt.Columns.Add(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataColumn(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">数字</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">typeof</SPAN><SPAN style="COLOR: #000000">(Int32)));<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;dt.Columns.Add(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataColumn(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">平方</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">typeof</SPAN><SPAN style="COLOR: #000000">(Int32)));<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;DataRow&nbsp;dr;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_206_270_Open_Image onclick="this.style.display='none'; Codehighlighter1_206_270_Open_Text.style.display='none'; Codehighlighter1_206_270_Closed_Image.style.display='inline'; Codehighlighter1_206_270_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_206_270_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_206_270_Closed_Text.style.display='none'; Codehighlighter1_206_270_Open_Image.style.display='inline'; Codehighlighter1_206_270_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;</SPAN><SPAN id=Codehighlighter1_206_270_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_206_270_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;dr</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">dt.NewRow();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;dr[</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">i;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;dr[</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">i</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">i;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;dt.Rows.Add(dr);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;ds.Tables.Add(dt);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;show.DataSource</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">ds.Tables[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">num</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">].DefaultView;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">show是DataGrid对象</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;show.DataBind();</SPAN></DIV></DIV>
<P><BR><BR>2.DataAdapter对象的使用<BR></P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strCon</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Data&nbsp;Source=.;uid=sa;pwd=hotman;Initial&nbsp;Catalog=pubs</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;SqlConnection&nbsp;conn</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlConnection(strCon);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strcmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">select&nbsp;*from&nbsp;titles</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;2种方法检索数据<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;SqlCommand&nbsp;comm=new&nbsp;SqlCommand(strcmd,conn);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;SqlDataAdapter&nbsp;cmd=new&nbsp;SqlDataAdapter();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;cmd.SelectCommand=comm;</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;SqlDataAdapter&nbsp;cmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlDataAdapter(strcmd,conn);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">在创建连接之后，必须检索数据并用所检索的数据填充dataset</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;conn.Open();</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">虽然.NET提供了断开式连接，但是为了提高性能，最好显式的打开关闭</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet&nbsp;ds</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;DataSet();</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">创建dataset对象</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;cmd.Fill(ds,</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">titles</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;show.DataSource</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">ds.Tables[</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">titles</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">].DefaultView;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;show.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;conn.Close();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV>
<P><BR><BR><BR>&nbsp;3.SqlDataReader对象的使用</P>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;DataReader是查询结果的一种只读访问<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">优点是大大加快了访问数据的速度<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">不提供断开式访问</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strCon</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Data&nbsp;Source=.;uid=sa;pwd=hotman;Initial&nbsp;Catalog=pubs</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000">&nbsp;strcmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">select&nbsp;*from&nbsp;titles</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;SqlConnection&nbsp;conn</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlConnection(strCon);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;SqlCommand&nbsp;cmd</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;SqlCommand(strcmd,conn);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;conn.Open();&nbsp;&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;SqlDataReader&nbsp;reader</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">cmd.ExecuteReader();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;show.DataSource</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">reader;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;show.DataBind();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;conn.Close();</SPAN></DIV></DIV>
<P><BR>&nbsp;</P>
<P>&nbsp;</P><img src ="http://www.blogjava.net/yuanhuaming/aggbug/10239.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/yuanhuaming/" target="_blank">疯流成性</a> 2005-08-16 16:31 <a href="http://www.blogjava.net/yuanhuaming/archive/2005/08/16/10239.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>