﻿<?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--随笔分类-asp</title><link>http://www2.blogjava.net/jackstudio/category/9251.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 19:47:26 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 19:47:26 GMT</pubDate><ttl>60</ttl><item><title>操作必须使用一个可更新的查询”的解决办法 </title><link>http://www.blogjava.net/jackstudio/archive/2007/02/08/98885.html</link><dc:creator>jackstudio</dc:creator><author>jackstudio</author><pubDate>Thu, 08 Feb 2007 15:30:00 GMT</pubDate><guid>http://www.blogjava.net/jackstudio/archive/2007/02/08/98885.html</guid><wfw:comment>http://www.blogjava.net/jackstudio/comments/98885.html</wfw:comment><comments>http://www.blogjava.net/jackstudio/archive/2007/02/08/98885.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jackstudio/comments/commentRss/98885.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jackstudio/services/trackbacks/98885.html</trackback:ping><description><![CDATA[
		<br />
		<br />有几个主要的错误原因： <br />这个错误发生在当你的程序试图执行更新数据库或其它类似操作时。这是因为 <br />ADO由于以下的几个原因而不能够写数据库造成的。 <br /><br />1。一般的原因都是匿名用户帐号(IUSR_MACHINE)对该数据库文件没有写权限。 <br />要解决这个问题，在管理器中调整数据库文件的属性，让匿名用户有正确的权限。 <br />当使用ACCESS数据库时，不仅要给文件写的权限，还要给该目录写的权限，因为 <br />Jet需要在该目录建立一个.ldb文件[NTFS硬盘格式才会出现,FAT格式的不会出现权限问题]。<br />或是在IIS中设置一个有读取写入权限的匿名帐户.<br /><br />2。第二个原因是数据库没有使用正确的模式打开。应该使用下面的方法打开。 
<div class="code">SQL = "UPDATE Products Set UnitPrice = 2;" <br />Set Conn = Server.CreateObject("ADODB.Connection") <br />Conn.Mode = 3 ''3 = adModeReadWrite <br />Conn.Open "myDSN" <br />Conn.Execute(SQL) <br />Conn.Close</div><br />注意默认的Mode是设置0(adModeUnknown),它是允许更新的。 <br /><br />3。还有可能是在ODBC管理器中将该DSN的只读选项选中。 <br /><br />4。你是在同时更新两个表中的字段，也会出现这个错误信息，解决办法是分开来更新 <br />这两个表中各自字段。 <br /><br />5。当你使用了一个从低版本中（如ACCESS2.0,ACCESS7.0）载入到高版本(ACCESS 2000) <br />中的查询时，在执行这个查询是会出现该错误。 <br /><br />如果是winXP系统<br />在文件夹选项里面默认<span style="COLOR: brown">使用简单共享(推荐)</span>，把这个选项去掉，<br />再在文件夹上右键点击，就会出现安全这个选项卡，<br />原来默认的没有，然后在安全选项卡里面可以设置用户的写入权限了<br />右击数据库&gt;安全&gt;everyone&gt;将需要的勾上<br /><br /><div style="OVERFLOW-X: auto; WIDTH: 100%"><a href="http://uir.photo.hexun.com/13258399_d.html" target="_blank"><img alt="查看更多精彩图片" src="http://photo4.hexun.com/p/2006/1230/66291/b_DC24ED4DE0C577548685A879ADEED6C4.jpg" onload="var image=new Image();image.src=this.src;if(image.width&gt;0 &amp;&amp; image.height&gt;0){if(image.width&gt;=510){this.width=510;this.height=image.height*510/image.width;}}" border="0" /></a> </div><br />遇到类似的问题还有: 
<div class="code">Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005' <br />[Microsoft][ODBC Microsoft Access Driver] 无法从指定的数据表中删除。</div><img src ="http://www.blogjava.net/jackstudio/aggbug/98885.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jackstudio/" target="_blank">jackstudio</a> 2007-02-08 23:30 <a href="http://www.blogjava.net/jackstudio/archive/2007/02/08/98885.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>分页类,调用很简单. ........</title><link>http://www.blogjava.net/jackstudio/archive/2006/10/26/77425.html</link><dc:creator>jackstudio</dc:creator><author>jackstudio</author><pubDate>Thu, 26 Oct 2006 08:27:00 GMT</pubDate><guid>http://www.blogjava.net/jackstudio/archive/2006/10/26/77425.html</guid><wfw:comment>http://www.blogjava.net/jackstudio/comments/77425.html</wfw:comment><comments>http://www.blogjava.net/jackstudio/archive/2006/10/26/77425.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jackstudio/comments/commentRss/77425.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jackstudio/services/trackbacks/77425.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: asp-----																Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->						  1												&lt;						% 						  2														...&nbsp;&nbsp;<a href='http://www.blogjava.net/jackstudio/archive/2006/10/26/77425.html'>阅读全文</a><img src ="http://www.blogjava.net/jackstudio/aggbug/77425.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jackstudio/" target="_blank">jackstudio</a> 2006-10-26 16:27 <a href="http://www.blogjava.net/jackstudio/archive/2006/10/26/77425.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>asp 生成静态页面的类.</title><link>http://www.blogjava.net/jackstudio/archive/2006/06/26/55087.html</link><dc:creator>jackstudio</dc:creator><author>jackstudio</author><pubDate>Mon, 26 Jun 2006 03:00:00 GMT</pubDate><guid>http://www.blogjava.net/jackstudio/archive/2006/06/26/55087.html</guid><wfw:comment>http://www.blogjava.net/jackstudio/comments/55087.html</wfw:comment><comments>http://www.blogjava.net/jackstudio/archive/2006/06/26/55087.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jackstudio/comments/commentRss/55087.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jackstudio/services/trackbacks/55087.html</trackback:ping><description><![CDATA[
		<p> </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: #008080">  1</span>
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">  2</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">author : jack</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  3</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">date   : 2005-11-12</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  4</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">email  : jieck422@163.com</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  5</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">文件存放解决办法：</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  6</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">把文件全部存放在saveFolder中，每个文件夹存放数量saveCount为2000个文件，用记录集的id整除saveCount（id\saveCount）</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  7</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">所得整数定为该文件所在目录，文件名就是该id号。例如：saveFolder="F:\test",saveCount=2000，在表中有一记录，其id为47（47\2000=0）,该</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  8</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">文件生成后存放的目录为F:\test\0\47.shtml</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">  9</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">dim</span>
				<span style="COLOR: #000000"> ID,myconn,zhli<br /></span>
				<span style="COLOR: #008080"> 10</span>
				<span style="COLOR: #000000">
						<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 />
				</span>
				<span style="COLOR: #008080"> 11</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">ID</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">request.querystring(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">id</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 12</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> myconn</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">new</span>
				<span style="COLOR: #000000"> GetConnection<br /></span>
				<span style="COLOR: #008080"> 13</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000"> myconn.openRS(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">select a.E_name,a.E_date,a.E_zhouqi,a.E_changban,a.E_begindate,a.E_enddate,a.E_address,a.E_zhanguan,a.E_content,case a.E_xingzhi when 0 then '国际展会' when 1 then '国内展会' else '国内展会' end as xiangzhi,a.E_company,a.E_chengban,a.E_beizhu,b.[name],b.Phone,b.Fax,b.Email,b.Qymc from zhanhui a,qiang_qyml b where a.Exhib_ID=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">ID</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> and a.gsid=b.id</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"> </span>
				<span style="COLOR: #0000ff">then</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 14</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />myconn.errMassege </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">记录集为空，请检查ID是否正确！^_^</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 15</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />response.end<br /></span>
				<span style="COLOR: #008080"> 16</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">else</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 17</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> zhli</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">new</span>
				<span style="COLOR: #000000"> ZhanHui_listinfo<br /></span>
				<span style="COLOR: #008080"> 18</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.letModAddress</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">F:\test\li.shtml</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 19</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.letSaveFolder</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">F:\test\</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 20</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.letSaveCount</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">2000</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 21</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.letContent</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">zhli.readContent<br /></span>
				<span style="COLOR: #008080"> 22</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_name$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 23</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_date$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 24</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_zhouqi$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">2</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 25</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_changban$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">3</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 26</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_begindate$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">4</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 27</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_enddate$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">5</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 28</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_address$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">6</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 29</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_zhanguan$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">7</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 30</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_content$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">8</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 31</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_xingzhi$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">9</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 32</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_company$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">10</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 33</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_chengban$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">11</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 34</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$E_beizhu$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">12</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 35</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$linkman$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">13</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 36</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$linkphone$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">14</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 37</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$linkfax$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">15</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 38</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$linkemail$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">16</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 39</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.replaceContent </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">{$companyname$}</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">,myconn.rs(</span>
				<span style="COLOR: #000000">17</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 40</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />zhli.asp2html zhli.makefilename(ID),zhli.getContent<br /></span>
				<span style="COLOR: #008080"> 41</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</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: #008080"> 42</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 43</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />class ZhanHui_listinfo<br /></span>
				<span style="COLOR: #008080"> 44</span>
				<span style="COLOR: #000000">
						<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 />
				</span>
				<span style="COLOR: #008080"> 45</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> modAddress,saveFolder,fso,ts,content,saveCount<br /></span>
				<span style="COLOR: #008080"> 46</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">modAddress---------摸班地址</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 47</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">saveFolder---------存放目录</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 48</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">content------------模版内容</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 49</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">saveCount----------存放数量</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 50</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">sub</span>
				<span style="COLOR: #000000"> class_initialize()</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">类初始化</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 51</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> fso</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">Server.CreateObject(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">SCRIPTING.FILESYSTEMOBJECT</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 52</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 53</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 54</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">property</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">let</span>
				<span style="COLOR: #000000"> letSaveCount(str)<br /></span>
				<span style="COLOR: #008080"> 55</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> saveCount</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">str<br /></span>
				<span style="COLOR: #008080"> 56</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end property</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 57</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 58</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">let saveFolder</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 59</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">property</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">let</span>
				<span style="COLOR: #000000"> letSaveFolder(str)<br /></span>
				<span style="COLOR: #008080"> 60</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> saveFolder</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">str<br /></span>
				<span style="COLOR: #008080"> 61</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end property</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 62</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 63</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">let modAddress</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 64</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">property</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">let</span>
				<span style="COLOR: #000000"> letModAddress(str)<br /></span>
				<span style="COLOR: #008080"> 65</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> modAddress</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">str<br /></span>
				<span style="COLOR: #008080"> 66</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end property</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 67</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 68</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">let Content</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 69</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">property</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">let</span>
				<span style="COLOR: #000000"> letContent(str)<br /></span>
				<span style="COLOR: #008080"> 70</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> content</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">str<br /></span>
				<span style="COLOR: #008080"> 71</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end property</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 72</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">get Content</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 73</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">property</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">get</span>
				<span style="COLOR: #000000"> getContent<br /></span>
				<span style="COLOR: #008080"> 74</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> getContent</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">content<br /></span>
				<span style="COLOR: #008080"> 75</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end property</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 76</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 77</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> makefilename(ID)</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">文件名以及路径</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 78</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> foldername</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">ID</span>
				<span style="COLOR: #000000">\</span>
				<span style="COLOR: #000000">saveCount<br /></span>
				<span style="COLOR: #008080"> 79</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">not</span>
				<span style="COLOR: #000000"> fso.FolderExists(saveFolder</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">foldername) </span>
				<span style="COLOR: #0000ff">then</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 80</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> fso.createfolder(saveFolder</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">foldername)<br /></span>
				<span style="COLOR: #008080"> 81</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </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: #008080"> 82</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> makefilename</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">saveFolder</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">foldername</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">&amp;</span>
				<span style="COLOR: #000000">ID</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">.shtml</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 83</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end function</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 84</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 85</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> readContent()</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">读取摸班内容</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 86</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> readts</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">fso.OpenTextFile(modAddress,</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 87</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> readcontent</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">readts.ReadAll()<br /></span>
				<span style="COLOR: #008080"> 88</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> readts.close<br /></span>
				<span style="COLOR: #008080"> 89</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end function</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 90</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 91</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> replaceContent(strOne,strTwo)</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">替换内容</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 92</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> content</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">replace</span>
				<span style="COLOR: #000000">(content,strOne,strTwo)<br /></span>
				<span style="COLOR: #008080"> 93</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end function</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080"> 94</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080"> 95</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">sub</span>
				<span style="COLOR: #000000"> asp2html(filename,filecontent)</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">生成shtml文件</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080"> 96</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> writets</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">fso.CreateTextFile(filename,</span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080"> 97</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> writets.Write(filecontent)<br /></span>
				<span style="COLOR: #008080"> 98</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> writets.close<br /></span>
				<span style="COLOR: #008080"> 99</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">100</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">101</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">end</span>
				<span style="COLOR: #000000"> class<br /></span>
				<span style="COLOR: #008080">102</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">103</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />class GetConnection<br /></span>
				<span style="COLOR: #008080">104</span>
				<span style="COLOR: #000000">
						<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 />
				</span>
				<span style="COLOR: #008080">105</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">  调用方法：</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">106</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">  dim myconn</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">107</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'</span>
				<span style="COLOR: #008000">  set myconn=new GetConnection</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">108</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />'<br /></span>
				<span style="COLOR: #008080">109</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> conn,connStr<br /></span>
				<span style="COLOR: #008080">110</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> rs<br /></span>
				<span style="COLOR: #008080">111</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">sub</span>
				<span style="COLOR: #000000"> class_initialize()</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">类初始化</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">112</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> connStr</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Provider=SQLOLEDB.1; Data Source=(local); Initial Catalog=myDATABASE; User ID=sa; Password=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">113</span>
				<span style="COLOR: #000000">
						<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 />
				</span>
				<span style="COLOR: #008080">114</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> conn</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">Server.CreateObject(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">ADODB.Connection</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">)<br /></span>
				<span style="COLOR: #008080">115</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> conn.open connStr<br /></span>
				<span style="COLOR: #008080">116</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">117</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">118</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">function</span>
				<span style="COLOR: #000000"> openRS(sql)<br /></span>
				<span style="COLOR: #008080">119</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> rs</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">conn.execute(sql)<br /></span>
				<span style="COLOR: #008080">120</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">if</span>
				<span style="COLOR: #000000"> rs.eof </span>
				<span style="COLOR: #0000ff">and</span>
				<span style="COLOR: #000000"> rs.bof </span>
				<span style="COLOR: #0000ff">then</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">121</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> openRS</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">false</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">122</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">else</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">123</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> openRS</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">true</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">124</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </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: #008080">125</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end function</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">126</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">127</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">public</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">sub</span>
				<span style="COLOR: #000000"> errMassege(mm) <br /></span>
				<span style="COLOR: #008080">128</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> response.write(</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&lt;center&gt;&lt;p&gt;&lt;font size=7 color=red&gt;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">mm</span>
				<span style="COLOR: #000000">&amp;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&lt;/font&gt;&lt;/p&gt;&lt;center&gt;</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">) <br /></span>
				<span style="COLOR: #008080">129</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">130</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">131</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">sub</span>
				<span style="COLOR: #000000"> class_terminate()</span>
				<span style="COLOR: #008000">'</span>
				<span style="COLOR: #008000">销毁类</span>
				<span style="COLOR: #008000">
						<br />
				</span>
				<span style="COLOR: #008080">132</span>
				<span style="COLOR: #008000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000"> conn.close<br /></span>
				<span style="COLOR: #008080">133</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">set</span>
				<span style="COLOR: #000000"> conn</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #0000ff">nothing</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">134</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /> </span>
				<span style="COLOR: #0000ff">end sub</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">135</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">136</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">end</span>
				<span style="COLOR: #000000"> class<br /></span>
				<span style="COLOR: #008080">137</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
				</span>
				<span style="COLOR: #008080">138</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
<img src ="http://www.blogjava.net/jackstudio/aggbug/55087.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jackstudio/" target="_blank">jackstudio</a> 2006-06-26 11:00 <a href="http://www.blogjava.net/jackstudio/archive/2006/06/26/55087.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>NextRecordset 和 GetRows </title><link>http://www.blogjava.net/jackstudio/archive/2006/05/26/48317.html</link><dc:creator>jackstudio</dc:creator><author>jackstudio</author><pubDate>Fri, 26 May 2006 05:55:00 GMT</pubDate><guid>http://www.blogjava.net/jackstudio/archive/2006/05/26/48317.html</guid><wfw:comment>http://www.blogjava.net/jackstudio/comments/48317.html</wfw:comment><comments>http://www.blogjava.net/jackstudio/archive/2006/05/26/48317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jackstudio/comments/commentRss/48317.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jackstudio/services/trackbacks/48317.html</trackback:ping><description><![CDATA[  NextRecordset 和 GetRows 大家可能用的很少！<br />最近使用使用，不错的好东东！<br />对提高批量查询，查询纪录集不是巨海量的情况很有效果<br />NextRecordset 和 GetRows 是Recordset的两个属性（属性还是方法我是常混淆是非#$#$，弄不清四下五除一） 
<p></p><p>GetRows ---&gt; 将recordset记录集提取到一个二维数组中，我们对recordset数据的行为就转移到该数组，可以早早的断开纪录集，不用再使用元数据操作，rs.movnext, while not rs.eof等可以省掉</p><p>NextRecordset ----&gt; 就是在一次提交多个查询，形成多个reordset结果集的情况下，提供一个离开当前工作的recordset，转移到第二个recordset的方法！<br />主要是用在多个SELECT形成的结果集的情况</p><p>示例如下：</p><p>dim SQL,Rs,arrA,arrB,rowsA,rowsB</p><p>''======提取数据库库记录====</p><p>（adodb.connection 的连接部分省略,假定CONN.open CONNstr）<br />SQL=" select Ca1,Ca2,Ca3,Ca4 from TableA " ''---------------SELECTa<br />SQL=SQL&amp;" select Cb1,Cb2,Cb3,Cb4,Cb5 from TableB " ''-------------SELECTb</p><p>Set Rs=conn.execute(SQL) <br />''执行结果将有两个select 的结果集，当前第一个select的recordset处于激活状态 </p><p>arrA=rs.GetRows ''----------取得SElECTa Recordset的二维数组</p><p>set rs=rs.NextRecordset <br />''------------最关键的一步，使用Nextrecordset激活下一个recordset</p><p>arrB=rs.GetRows ''----------再次取得第二个SElECTb Recordset的二维数组 </p><p>Rs.close<br />set rs=nothing ''---------尽早释放数据库对象，关闭记录集<br />CONN.close<br />set CONN=Nothing<br />这样，我们所有关于数据库的数据干干净净的提取完成，用最早的时间释放数据库资源 <br />''-----------//</p><p>''========用取得的arrA arrB进行页面处理,显示数据结果======<br />''注意，arrA=GetRows 后得到的数组，第一维是代表列，第二维代表行</p><p>rowsA=ubound(arrA,2) ''----提取arrA的第二维下标，相当于取得recordset 的记录行数<br />rowsB=ubound(arrB,2) ''-----同上，提取arrB的第二维下标 </p><p>''做数据循环：</p><p>''第一个select表的循环<br />response.write "&lt;table&gt;"<br />For i=0 to rowsA<br />response.write "&lt;tr&gt;<br />response.write "&lt;td&gt;"&amp;arrA(i,0)&amp;"&lt;/td&gt;" ''tableA.Ca1 <br />response.write "&lt;td&gt;"&amp;arrA(i,1)&amp;"&lt;/td&gt;" ''tableA.Ca2 <br />response.write "&lt;td&gt;"&amp;arrA(i,2)&amp;"&lt;/td&gt;" ''tableA.Ca3 <br />response.write "&lt;td&gt;"&amp;arrA(i,3)&amp;"&lt;/td&gt;" ''tableA.Ca4 <br />response.write "&lt;/tr&gt;"<br />Next<br />response.write "&lt;/table&gt;</p><p>''第二个select表循环<br />response.write "&lt;table&gt;"<br />For i=0 to rowsB<br />response.write "&lt;tr&gt;<br />response.write "&lt;td&gt;"&amp;arrB(i,0)&amp;"&lt;/td&gt;" ''tableB.Cb1 <br />response.write "&lt;td&gt;"&amp;arrB(i,1)&amp;"&lt;/td&gt;" ''tableB.Cb2 <br />response.write "&lt;td&gt;"&amp;arrB(i,2)&amp;"&lt;/td&gt;" ''tableB.Cb3 <br />response.write "&lt;td&gt;"&amp;arrB(i,3)&amp;"&lt;/td&gt;" ''tableB.Cb4 <br />response.write "&lt;td&gt;"&amp;arrB(i,4)&amp;"&lt;/td&gt;" ''tableB.Cb5 <br />response.write "&lt;/tr&gt;"<br />Next<br />response.write "&lt;/table&gt;</p><p>''--------OVER</p><p>REM ''============小结========</p><p>这样的结果，再清楚不过！<br />（1）使用Nextrecordset,可以处理多个select语句一次发送形成的结果集，减少网络流量，必定加快速度！<br />不使用NextRecordset 则会这样操作：<br />SQL="select Ca1,Ca2,Ca3, Ca4 From TableA "<br />set Rs=CONN.execute (SQL)<br />SQL=" select Cb1,Cb2,Cb3,Cb4,Cb5 from TableB "<br />Set Rs=CONN.execute (SQL)<br />（2）使用GetRows将记录集提取到数组中（放到内存，所以要求记录集不要海大啦）<br />用内存的数组工作，而且省掉EOF,movenext等的判断，谁更快！自不必说！<br />（3）最最主要的，我们利用上二者，一次性将所有的数据提完，快速断开数据库连接和摧毁建立recordset数据库对象，大大减少网络流量！性能自然要提高很多！</p><p> </p><img src ="http://www.blogjava.net/jackstudio/aggbug/48317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jackstudio/" target="_blank">jackstudio</a> 2006-05-26 13:55 <a href="http://www.blogjava.net/jackstudio/archive/2006/05/26/48317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>