Database
  Home arrow Database arrow Page 4 - 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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: 4 stars4 stars4 stars4 stars4 stars / 3
    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
     
     
    ADVERTISEMENT


    Using ADO Record to Create and Navigate Intranet Files and Folders - Adding files to folders


    (Page 4 of 6 )

    In this section files will be added to the folders created. It is essential to understand the nature of files and folders as described in the links cited in the tutorial. Again the code in the following paragraph is attached to a button click event on a form. Although the creation of folders and files were shown in two separate snippets, all of this can be contained in a single snippet to create folders and files all at once. Observe the usage of enums, adCreateCollection and adCreateNonCollection in the folder/file creation process.

    Option Compare Database
    Private rec As ADODB.Record
    Private rst As ADODB.Recordset
    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
    

    This creates the files in the ASPFree folder as shown in the next picture.

    Since these are also created in the root directory they will be found in C:InetpubwwwrootDevHomeASPFree as 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

    - Building Applications with Anonymous Types
    - A Closer Look at Anonymous Types
    - Programming with Anonymous Types
    - Converting Your Excel Worksheet into a Worki...
    - Excel Reference
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek