Database
  Home arrow Database arrow Page 5 - Using ADO Record to Create and Navigate In...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE

Using ADO Record to Create and Navigate Intranet Files and Folders
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2006-10-04

    Table of Contents:
  • Using ADO Record to Create and Navigate Intranet Files and Folders
  • Creating folders
  • Creating files
  • Adding files to folders
  • Navigating the files and folders
  • Copying files from one folder to another

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Using ADO Record to Create and Navigate Intranet Files and Folders - Navigating the files and folders
    (Page 5 of 6 )

    These files and folders can be accessed as easily as they were created. For example the statement rec.Open with the first argument set equal to: "DevHome/ASPFree" would open that folder and the various files added are its children. Hence getChildren will get all the children. The record also has its fields, one of which is ASPFree which happens to be the RESOURCE_PARSENAME. The loop puts out all the record-related information (not that of the children). These are also shown in the comments of the following code listing.

    Option Compare Database
    Private rec As ADODB.Record
    Private chilun2 As ADODB.Record
    Private Sub Command0_Click()
    Set rec = New ADODB.Record
    'open the ASPFREE folder
    rec.Open "DevHome/ASPFree", "URL=http://hodentek/"
    'count how many fields there are in the folder
    MsgBox (rec.Fields.Count)
    'print the name, value pair for each field
    For i = 0 To rec.Fields.Count - 1
    Debug.Print rec.Fields(i).Name & "  :  " _
    & rec.Fields(i).Value
    Next i
    MsgBox ("rec fields: " & rec.Fields _
    ("RESOURCE_PARSENAME").Value)
    MsgBox ("parentUrl" & rec.ParentURL)
    'get the children of this folder
    Set chilun = rec.GetChildren
    'get all the children
    Do Until chilun.EOF
    Debug.Print chilun(0) & vbCrLf
    chilun.MoveNext
    Loop
    Debug.Print "--------------------------------------"
    End Sub
    

    The result of running this code as it appears in the immediate window is shown in the following paragraph.

    RESOURCE_PARSENAME  :  ASPFree
    RESOURCE_PARENTNAME  :  http://hodentek/DevHome
    RESOURCE_ABSOLUTEPARSENAME  :  http://hodentek/DevHome/ASPFree
    RESOURCE_ISHIDDEN  :  
    RESOURCE_ISREADONLY  :  
    RESOURCE_CONTENTTYPE  :  
    RESOURCE_CONTENTCLASS  :  
    RESOURCE_CONTENTLANGUAGE  :  
    RESOURCE_CREATIONTIME  :  
    RESOURCE_LASTACCESSTIME  :  
    RESOURCE_LASTWRITETIME  :  
    RESOURCE_STREAMSIZE  :  
    RESOURCE_ISCOLLECTION  :  True
    RESOURCE_ISSTRUCTUREDDOCUMENT  :  
    DEFAULT_DOCUMENT  : http://hodentek/Default.htm; 
    http://hodentek/Default.asp; http://hodentek/index.htm; http://hodentek/iisstart.asp; RESOURCE_DISPLAYNAME : ASPFree RESOURCE_ISROOT : False RESOURCE_ISMARKEDFOROFFLINE : RESOURCE_METATAGS : RESOURCE_LISTBASETYPE : DAV:name : ASPFree DAV:parentname : http://hodentek/DevHome DAV:displayname : ASPFree DAV:iscollection : True DAV:isroot : False DAV:defaultdocument : http://hodentek/Default.htm;
    http://hodentek/Default.asp; http://hodentek/index.htm; http://hodentek/iisstart.asp; Test.aspx Test.bmp Test.htm Test.xls --------------------------------------

    More Database Articles
    More By Jayaram Krishnaswamy


       · This is very important if you are planning to make changes to your web site. I can...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway