Forum Moderators: open

Message Too Old, No Replies

ASP with txt file not working

         

merijnvw

8:03 pm on Nov 22, 2008 (gmt 0)

10+ Year Member



hi, i want ASP to store data that people type in a text box in a txt file, i have this code:

<form name="vorm" method="post" action="maak.asp">
wat is regel 1: <input type="text" name="eerste" size="20">
wat is regel 2: <input type="text" name="tweede" size="20">
<input type="submit" name="submit" value="Send">
</form>

which links to this:

<html>
<title>maak een txt file</title>
<body>

<%
Set fileObj=Server.CreateObject("Scripting.FileSystemObject")
set file1=fileObj.CreateTextFile("zzz.txt")
file1.WriteLine Request.Form("eerste")
file1.WriteLine Request.Form("tweede")
file1.Close
set file1=nothing
set fileObj=nothing
%>

<a href="leesaf.asp">ga door</a>
</body>
</html>

But when on the asp site, i run the code and type in some stuff, and submit, it gives me this error:
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/Zadelbrecht/maak.asp, line 6

800401f3

What am I doing wrong?

[edited by: encyclo at 9:46 pm (utc) on Nov. 22, 2008]
[edit reason] no links to personal sites please, see terms of service [/edit]

bmcgee

4:09 am on Nov 24, 2008 (gmt 0)

10+ Year Member



Make sure that the anonymous IUSR account for your visitors has permissions to scrrun.dll

merijnvw

7:45 pm on Nov 24, 2008 (gmt 0)

10+ Year Member



?
I don't understand that