IIS5 + ADO 2.5 New Sneak Peek Technology

Source: Internet
Author: User
Tags chr iis new features
The new ADO 2.5 version is IIS5 (that is, installing Win2000), especially
Added support for XML technology and brought in a number of new technologies that can
Help us implement features that must have depended on components or other technologies before they could be implemented.
I'll give you a simple introduction to this new Web mix.
From this we can see that learning and mastering XML technology is imminent. Welcome everyone to the next door.
The XML Learning garden as a guest ...
One of the new technologies:
A new Record object (not confused with the Recordset object) is added to ADO ...
It can manipulate any file on the server ...
Here is the example that it uses:

<%
Dim Recroot
Dim Rsfiles

Set recroot = Server.CreateObject ("ADODB. Record ")

' Note that the open URL must be running IIS5 or support WebDAV services.
' As to what is WebDAV please go to the next door and see
Recroot.open "", "Url=http://localhost/iis", adModeRead
Response.Write "<UL>" & Chr (+) & Chr (10)
TraverseTree Recroot
Response.Write "</ul>" & Chr (+) & Chr (10)
Recroot.close
Set recroot = Nothing

Sub TraverseTree (Recnode)

Dim Rschildren
Dim Recchildnode
Set Recchildnode = Server.CreateObject ("ADODB. Record ")

Response.Write "<LI>" & Recnode ("Resource_parsename") & Chr (+) & Chr (10)
Set Rschildren = Recnode.getchildren

If not rschildren.eof Then
Response.Write "<UL>" & Chr (+) & Chr (10)
While not rschildren.eof
If Rschildren ("Resource_iscollection") Then
Recchildnode.open Rschildren
TraverseTree Recchildnode
Recchildnode.close
Else
Response.Write "<LI>" & Rschildren ("Resource_parsename") & Chr (+) & Chr (10)
End If
Rschildren.movenext
Wend
Response.Write "</UL>" & Chr (+) & Chr (10)
End If
Rschildren.close
Set Rschildren = Nothing
Set Recchildnode = Nothing
End Sub
%>

Given that a lot of people are not installing Win2000, I've also given the results,
You can see the results of the code running ...
Note To get the correct results you must make the IIS directory available directory browing
<UL>
<li>iis
<UL>
<li>sdk
<UL>
<li>admin
<UL>
<li>mkwebsrv.vbs
<li>mkwebsrv.js
<li>metabackrest.vbs
<li>metabackrest.js
<li>metaback.vbs
<li>metaback.js
<li>logenum.vbs
<li>logenum.js
</UL>
<li>asp
<UL>
<li>applications
<UL>
<li>session_vbscript.asp
<li>session_jscript.asp
<li>application_vbscript.asp
<li>application_jscript.asp
</UL>
<li>components
<UL>
<li>redirect.asp
<li>nts_iis.gif
<li>ie.gif
<li>clientcap.htm
<li>browsercap_vbscript.asp
<li>browsercap_jscript.asp
<li>adrotator_vbscript.asp
<li>adrotator_jscript.asp
<li>adrot.txt
</UL>
<li>database
<UL>
<li>update_vbscript.asp
<li>update_jscript.asp
<li>storedprocedures_vbscript.asp
<li>storedprocedures_jscript.asp
<li>simplequery_vbscript.asp
<li>simplequery_jscript.asp
<li>multiscrolling_vbscript.asp
<li>multiscrolling_jscript.asp
<li>limitrows_vbscript.asp
<li>limitrows_jscript.asp
<li>authors.mdb
<li>adddelete_vbscript.asp
<li>adddelete_jscript.asp
</UL>
<li>docs
<UL>
<li>toolbar.asp
<li>sampfram.asp
<li>libcodebrws.inc
<li>colorpicker.asp
<li>codebrws.asp
</UL>
<li>interaction
<UL>
<li>servervariables_vbscript.asp
<li>servervariables_jscript.asp
<li>redirect_vbscript.asp
<li>redirect_jscript.asp
<li>querystring_vbscript.asp
<li>querystring_jscript.asp
<li>populateform_vbscript.asp
<li>populateform_jscript.asp
<li>pics_vbscript.asp
<li>pics_jscript.asp
<li>logon_vbscript.asp
<li>logon_jscript.asp
<li>form_vbscript.asp
<li>form_jscript.asp
<li>filelist.txt
<li>expire_vbscript.asp
<li>expire_jscript.asp
<li>cookie_vbscript.asp
<li>cookie_jscript.asp
<li>clientscript_vbscript.asp
<li>clientscript_jscript.asp
</UL>
<li>simple
<UL>
<li>variables_vbscript.asp
<li>variables_jscript.asp
<li>looping_vbscript.asp
<li>looping_jscript.asp
<li>includes_vbscript.asp
<li>includes_jscript.asp
<li>headerinfo.asp
<li>functions_vbscript.asp
<li>functions_jscript.asp
<li>conditional_vbscript.asp
<li>conditional_jscript.asp
<li>arrays_vbscript.asp
<li>arrays_jscript.asp
</UL>
<li>transactional
<UL>
<li>simpletransaction_vbscript.asp
<li>simpletransaction_jscript.asp
<li>fundtransfer_vbscript.asp
</UL>
</UL>
</UL>
<li>homepage
<UL>
<li>themes
<UL>
<li>gunmetal
<UL>
<li>setup.inc
<li>layout.inc
<li>layout.css
<li>gradient.gif
</UL>
<li>journal
<UL>
<li>setup.inc
<li>rip3.gif
<li>rip2_2.gif
<li>layout.inc
<li>layout.css
</UL>
<li>looseleaf
<UL>
<li>setup.inc
<li>layout.inc
<li>layout.css
</UL>
</UL>
<li>themes.inc
<li>theme.inc
<li>sub.inc
<li>signbook.asp
<li>myfiles.asp
<li>guestbk.asp
<li>global.asa
<li>file.gif
<li>default.asp
<li>bullet.gif
</UL>
<li>global.asa
</UL>
</ul> here to introduce the new features of the second IIS5 + ADO 2.5:
A new stream object has been added to ADO ...
As the name implies, the stream object can open any file on the server in a stream to read and write ...
Of course, the result of reading is writing to a Unicode stream ...

Here is the example that it uses:
This is the example of the file that it reads:

<%
Dim Stmdata

Set stmdata = Server.CreateObject ("ADODB. Stream ")

Stmdata.open "Url=http://localhost/ad/readme.txt", adModeRead, Adopenstreamfromurl

Response.Write Stmdata.readtext

Stmdata.close
Set Stmdata = Nothing
%>

This is an example of how it writes a file:
<%
Dim Stmdata
Set stmdata = Server.CreateObject ("ADODB. Stream ")
With Stmdata
. Open "Url=http://localhost/ad/red.txt", adModeReadWrite, Adopenstreamfromurl

' Set the position at the front of the stream
. Position = 0
' Set the current position to the end position of the stream
' So that the contents of the current stream are deleted
. SetEOS
. WRITETEXT "Test"

Response.Write "File has been updated. The current size is &. Size
. Close
End With

Set s = Nothing
%>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.