Opening and Writing a File

Results 1 to 2 of 2

Thread: Opening and Writing a File

  1. #1
    Join Date
    Dec 1969

    Default Opening and Writing a File

    I am using Windows 98 with PWS. The below code is not working and freezes up the browser. However, it doesn&#039t happen for every file. Some files are opened and written without problems, and others seem to have trouble. Even the ones that have trouble sometimes work fine. This is the code:<BR><BR><BR>Set objFS = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objFile = objFS.OpenTextFile(strLocation,ForReading,Tristate False)<BR><BR>Do While objFile.AtEndOfStream &#060;&#062; TRUE<BR> strLine = objFile.ReadLine<BR> strLine = Server.HTMLEncode(strLine)<BR> Response.Write(strLine) & VbCrLf<BR>Loop<BR><BR>objFile.close<BR><BR><BR>Doe s anybody has any idea why this is occuring? Does it have to do with the size of file being opened? Any help is appreciated.

  2. #2
    Rahul Guest

    Default RE: Opening and Writing a File

    Script is absolutely correct. I opened 8 MB of text file with this..<BR>Must be something to do with HW/SW installation..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts