DOC: Incorrect Code Sample in the InterDev Documentation (166888)
The information in this article applies to:
- Microsoft Visual InterDev 1.0
- Microsoft Visual InterDev 6.0
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
%>
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:
Modification Type: | Major | Last Reviewed: | 5/2/2006 |
---|
Keywords: | kbbug kbdocerr kbScript KB166888 |
---|
|