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  
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 - 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

    - 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