Database
  Home arrow Database arrow Page 3 - 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 - Creating files
    (Page 3 of 6 )

    Just as you created the folders, you can create files. While reviewing the earlier suggested links you might have learned the difference between a folder and a file. The folder is a container of files, whereas the file has to stand by itself. In other words the file is a non-collection type in the parlance of ADO.

    Add a form in design and add the following code to the click event of the button.

    Private Sub Command0_Click()
    Set rec = New ADODB.Record
    'Open the DevHome/AspFree folder
    rec.Open "DevHome/ASPFree", _
    "URL=http://hodentek/", , _
    adCreateOverwrite + adCreateCollection
    rec.Close
    'create a Test.htm file in the ASPFree folder
    rec.Open "DevHome/ASPFree/Test.htm", _
    "URL=http://hodentek/", , _
    adCreateOverwrite + adCreateNonCollection
    rec.Close
    'create a Test.xls file in the ASPFree folder
    rec.Open "DevHome/ASPFree/Test.xls", _
    "URL=http://hodentek/", , _
    adCreateOverwrite + adCreateNonCollection
    rec.Close
    'create a Test.BMP file in the ASPFree folder
    rec.Open "DevHome/ASPFree/Test.bmp", _
    "URL=http://hodentek/", , _
    adCreateOverwrite + adCreateNonCollection
    rec.Close
    'create a Test.aspx file in the ASPFree folder
    rec.Open "DevHome/ASPFree/Test.aspx", _
    "URL=http://hodentek/", , _
    adCreateOverwrite + adCreateNonCollection
    rec.Close
    'adCreateOverwrite and adCreateNonCollection etc can be added
    End Sub
    

    ADO objects are rich in enum constants; it will be useful if you can verify what they mean by going to the Object Browser. Here is one example, shown in the next picture.

    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

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




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