DOC: Incorrect Code Sample in the InterDev DocumentationID: Q166888
|
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
%>
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 : kbdocerr kbScript kbVisID100 kbVisID600 kbGrpASP VIScripting
Version : 1.0,6.0
Platform : WINDOWS
Issue type :
Last Reviewed: May 10, 1999