Database
  Home arrow Database arrow Reading and Writing to Files on the Intran...
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

Reading and Writing to Files on the Intranet
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2006-10-10

    Table of Contents:
  • Reading and Writing to Files on the Intranet
  • Opening the Stream Object
  • Can you read text in another language?
  • Writing to a file with an HTM extension
  • Reading and writing binary files

  • 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


    Reading and Writing to Files on the Intranet


    (Page 1 of 5 )

    This tutorial will show you how to read data in files on an intranet site, as well as write to files on an intranet site. You will be using the Record and Stream objects with ADO to accomplish these tasks.

    Introduction

    Record and Stream objects introduced with ADO 2.5 give a great deal of flexibility in accessing the files and folders on the intranet site. The Record Object  has been treated in some detail in earlier tutorials and the Stream object was also introduced. The ability of the Record object to create and manipulate folders and files, combined with the ability to write and read files using Stream objects, is what confers this flexibility. The Stream object gives access to the text or binary data in the buffer.

    Overview of this tutorial

    The tutorial provides examples of reading data in files on the intranet site, as well as writing to files on the intranet which were created using the Record object or otherwise. The data read and written to the files may be of the text or binary types. The code listings in this tutorial were all tested with MS Access 2003, used mainly for accessing the Microsoft Visual Basic Editor. The file manipulations on the web site used the intranet site http://hodentek. ADO 2.8 was used for making the reference to the library as shown in the next section.

    Adding a reference to the ADO 2.8 library

    The MS Access Application Stream is open in the Visual Basic editor. Go to Tools -->References... as shown in the next picture.

    This brings up the References - stream window as shown. Here you use the scroll bar to scroll down and pick ADO 2.8 (msado15.dll). The default may be ADO 2.0. Now you can access all the properties and methods of all the ADO objects, including the Stream object.

     

    More Database Articles
    More By Jayaram Krishnaswamy


       · This is a powerful procedure, but use it with caution. Any procedure that gives...
     

    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 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek