Dose any body know what this error means??
Microsoft VBScript runtime error '800a0036'
Bad file mode
/clannzb/data.asp, line 37
Thanks for any help
And
If you look at the code bellow when i type text in to the text file TEMP_N_C.txt but i have a Carrage return in it it only reads the bottom line eg.
TEMP_N_C.txt:
Dan
2/12/2002
Welcom this is the text of the file it works fine untill i do this
now it doesn't work it only writes out to the form the text after the carrage return
End of file
in this eg. it would only write out: "after the carrage return" bit, How do get it to write out the WHOLE thing???
<%
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_ID.txt"
,1,true)
do until ts.atendofstream
ID = ts.readline
Loop
if ID = "1" then
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_N_C.txt"
,1,true)
NoP = ts.readline
ignorLine = ts.readline
do until ts.atendofstream
CoP = ts.readline
Loop
Else
NoP = ""
CoP = ""
End if
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_SUB1_SUB2.txt"
,2,true)
ts.writeline ""
%>
Guest Book:<br>
<br>
<form name="form1" method="post" action="data.asp">
<p>Your name:
<input name="namePerson" type="text" value=<% response.write NoP%>>
</p>
<p> The date is:
<input type="text" name="date" value="<%=date%>">
</p>
<p>Comments:</p>
<p>
<textarea name="comments" cols="45" rows="5"><% response.write CoP%></textarea>
</p>
<p>
<input type="submit" name="BUTTON" value="Preview">
<input type="submit" name="BUTTON" value="Submit">
<input type="reset" name="BUTTON" value="Reset">
</p>
</form>
Microsoft VBScript runtime error '800a0036'
Bad file mode
/clannzb/data.asp, line 37
Thanks for any help
And
If you look at the code bellow when i type text in to the text file TEMP_N_C.txt but i have a Carrage return in it it only reads the bottom line eg.
TEMP_N_C.txt:
Dan
2/12/2002
Welcom this is the text of the file it works fine untill i do this
now it doesn't work it only writes out to the form the text after the carrage return
End of file
in this eg. it would only write out: "after the carrage return" bit, How do get it to write out the WHOLE thing???
<%
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_ID.txt"
do until ts.atendofstream
ID = ts.readline
Loop
if ID = "1" then
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_N_C.txt"
NoP = ts.readline
ignorLine = ts.readline
do until ts.atendofstream
CoP = ts.readline
Loop
Else
NoP = ""
CoP = ""
End if
set fs=server.createobject("scripting.filesystemobject"
set ts=fs.opentextfile (server.mappath ("db/TEMP_SUB1_SUB2.txt"
ts.writeline ""
%>
Guest Book:<br>
<br>
<form name="form1" method="post" action="data.asp">
<p>Your name:
<input name="namePerson" type="text" value=<% response.write NoP%>>
</p>
<p> The date is:
<input type="text" name="date" value="<%=date%>">
</p>
<p>Comments:</p>
<p>
<textarea name="comments" cols="45" rows="5"><% response.write CoP%></textarea>
</p>
<p>
<input type="submit" name="BUTTON" value="Preview">
<input type="submit" name="BUTTON" value="Submit">
<input type="reset" name="BUTTON" value="Reset">
</p>
</form>