一个最简单的vbs类实例代码
class CFoosub PrintHello()response.Write "Hello World!"end sub end class dim obj set obj = new CFoocall obj.PrintHello set obj = nothing
class CFoosub PrintHello()response.Write "Hello World!"end sub end class dim obj set obj = new CFoocall obj.PrintHello set obj = nothing
比如:Set Connobject=nothing nothing如同英文单词字面意思,没有,没有那个,没有这个,没有东西 Set Connobject=nothing意思是指使对象Connobject变没有,就是清空对象了。
这个分页使用的是0游标,也就是Rs.Open Sql,Conn,0,1。但是感觉也快不了多少,10万条数据的分页时间300多豪秒之间。实现代码如下:0 Then Err.Clear PageRs.Close Set PageRs=Nothing ErrInfo=ErrInfo&"建立或打开记
---"Response.write Objfile.nameNextResponse.write ""Bianli(nowpath)'递归NextSet Objfolder=nothingSet Objsubfolders=nothingSet Fso=nothingEnd Function%&g
" target="_blank">" class="framed" width="88" height="31" alt="" />")end ifi=i+1rs.movenextLooprs.closeset rs=nothing%>
实现代码如下:Dim oShellSet oShell = WScript.CreateObject ("WSCript.shell")oShell.run "cmd /K CD c:\ & dir"Set oShell = Nothing
205 ThenoRs2(oRs2(I).Name)=MyReplace(oRs2(I).value)End IfNextoRs2.updateoRs2.MoveNextLoopoRs2.closeset oRs2=NothingEnd If oRs.Movenext Loop oRs.close