DOC: Incorrect Code Sample in the InterDev Documentation

Last reviewed: December 11, 1997
Article ID: Q166888
The information in this article applies to:
  • Microsoft Visual InterDev, version 1.0

SUMMARY

In the "User's Guide, Server-Side Scripting" documentation under the topic "Using The Server Object" in the section "Reading from and Writing to Files" there is an incorrect code sample.

The existing code is as follows:

   <%
   Set OutStream = Server.CreateObject("MS.TextStream")
   OutStream.CreateTextFile "tsworks.txt", , True
   OutStream.WriteLine "This line is written to the file."
   %>

The correct code is as follows:

   <%
   Set fs = CreateObject("Scripting.FileSystemObject")
   Set a = fs.CreateTextFile("c:\testfile.txt", True)
   a.WriteLine("This is a test.")
   a.Close
   %>

REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/

Keywords          : VIScripting
Version           : 1.0
Platform          : WINDOWS
Issue type        : kbdocerr


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.