Microsoft KB Archive/166888

= DOC: Incorrect Code Sample in the InterDev Documentation =

Article ID: 166888

Article Last Modified on 5/2/2006

-

APPLIES TO


 * Microsoft Visual InterDev 1.0 Standard Edition
 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q166888



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 incorrect code sample also occurs in the "Visual InterDev Documentation" in the "Using Visual InterDev" chapter in the "Editing and Scripting" section in the "Scripting Tasks" section in the "Scripting with HTML Elements" section in the "Sharing Dynamic Information" document.

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

