Active Server Pages

Moderators: None (Apply to moderate this forum)
Number of threads: 1751
Number of posts: 4473

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
ASP coding error Posted by lia on 7 Aug 2002 at 9:12 PM
hello, can u help me?
my prob is, this message appear whrn i want to view my file

Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'opentextfile'
/menu.asp

my coding as i state like this:

<%
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath("aspcount.txt"))
counter = clng(act.readline)
if session("been_here_before") = "" then
session("been_here_before") = "Yes"
counter = counter + 1
Set act = fso.CreateTextFile(server.mappath("aspcount.txt"), true)
act.WriteLine(counter)
end if
act.Close
Response.Write counter
%>

tq!
Report
Re: ASP coding error Posted by gigsvoo on 9 Aug 2002 at 1:51 AM
: <%
: set fso = createobject("scripting.filesystemobject")
: set act = fso.opentextfile(server.mappath("aspcount.txt"))
: counter = clng(act.readline)
: if session("been_here_before") = "" then
: session("been_here_before") = "Yes"
: counter = counter + 1
: Set act = fso.CreateTextFile(server.mappath("aspcount.txt"), true)
: act.WriteLine(counter)
: end if
: act.Close
: Response.Write counter
: %>

act should be declared as TextStream in this case.

Neo Gigs
http://communities.msn.com.my/VisualBasicwithNeo




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.