• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

ASP Question

aiex

Senior member
I am trying to program a page in asp and i am a noob at it. I cannot seam to get databases working with my webspace (www.easyspace.com) but i can use text files. I am having problems writing to a text file at the mo though. The code is as follows:

Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
set MyTextFile2=MyFileObject.OpentextFile(Server.MapPath("/LogedIn/Pass1234") & "/Logininfo1.txt", 8)
MyTextFile2.Writeline "Hello World!"

The Error i get is:
Vbscript Interpretation error 'ASP 0185 : 800200004'

/showusers.asp,line 46

(line 46 is the write line line.)

Please Help if you can it is really getting on my nerves as i feel it is something very simple.

Alex 😀

PS. if you feel like helping further my MSN address is alex_b57@hotmail.com
 
I haven't coded in ASP for ages (converted 2 PHP 🙂), but I think I can see the problem...

MyTextFile2.Writeline "Hello World!"

I think should be...

MyTextFile2.Writeline("Hello World!")

i.e. it should have brackets around it. Dunno if that'll solve it, just a guess!

teknodude
 
You don't have access to "/LogedIn/Pass1234" & "/Logininfo1.txt" from the IUSR account most likely. Check your permissions...

MyTextFile2.Writeline "Hello World!"

I think should be...

MyTextFile2.Writeline("Hello World!")

You can't call a sub with () in VB[Script]. The following are valid...

Call MyTextFile2.WriteLine("Hello World!")
and
MyTextFile2.WriteLine "Hello World!"

Not

MyTextFile2.WriteLine("Hello World!")

 
Back
Top