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

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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Reading and Writing to Files on the Intranet - Writing to a file with an HTM extension
    (Page 4 of 5 )

    The listing in the next paragraph writes to the Test.htm file on the intranet site in the folder.

    Set rec = New ADODB.Record
    rec.Open "DevHome/ASPFree/Test.htm", _
    "URL=http://hodentek/", adModeReadWrite, _
    adCreateOverwrite + adCreateNonCollection
    Set strm = New ADODB.stream
    strm.Type = adTypeText
    strm.Charset = "ASCII"
    strm.Open rec, adModeReadWrite, adOpenStreamFromRecord
    strm.WriteText "<html><head><title>QuoteFromPrince</title></head><body>", 
    adWriteLine strm.WriteText "<center><p><font color='red'>Quote from Prince Niccolo
    Machiavelli</font></p> </center> " strm.WriteText "<blockquote><font color='blue'>It must be remembered that
    there is nothing more difficult of success, nor more dangerous to plan than the", adWriteLine strm.WriteText "creation of a new System --<b>The Prince</b></font>
    </blockquote>", adWriteLine strm.WriteText "</body></html>" strm.Flush strm.Close rec.Close End Sub

    The Test.htm file when browsed shows the following display.

     

    More Database Articles
    More By Jayaram Krishnaswamy


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

    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 4 hosted by Hostway