Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replacing text file with application

Status
Not open for further replies.

UnfitElf

Programmer
Dec 3, 2002
24
NZ
hi all.. i an making a chat room in asp..

i have got a problem with using applications. For some reasion they r not doing what i think they would.. its like they are not retaining there value. I have done it with a text file as a temp thing to see if the rest of my code is working, and now that it is i need to change it back to using applications.

the code is:

<%
set fs=server.createobject(&quot;scripting.filesystemobject&quot;)
set ts=fs.opentextfile (server.mappath (&quot;db/number.txt&quot;),1,true)

do until ts.atendofstream
i = ts.readline
Loop

If Request(&quot;BUTTON&quot;)=&quot;Submit&quot; and i <= 5 Then
Application(&quot;comments&quot;)=Application(&quot;comments&quot;) & &quot;<P>&quot; & Request(&quot;comments&quot;)
i = i+1
Application(&quot;comments&quot;& i)=Request(&quot;comments&quot;)
set ts=fs.opentextfile (server.mappath (&quot;db/number.txt&quot;),2,true)
ts.writeline i

Else If Request(&quot;BUTTON&quot;)=&quot;Submit&quot; and i > 5 Then
Application(&quot;comments0&quot;)=Application(&quot;comments1&quot;)
Application(&quot;comments1&quot;)=Application(&quot;comments2&quot;)
Application(&quot;comments2&quot;)=Application(&quot;comments3&quot;)
Application(&quot;comments3&quot;)=Application(&quot;comments4&quot;)
Application(&quot;comments4&quot;)=Application(&quot;comments5&quot;)
Application(&quot;comments5&quot;)=Application(&quot;comments6&quot;)
Application(&quot;comments6&quot;)=Request(&quot;comments&quot;)
Application(&quot;comments&quot;)=Application(&quot;comments0&quot;) & &quot;<p>&quot; & Application(&quot;comments1&quot;) & &quot;<p>&quot; & Application(&quot;comments2&quot;) & &quot;<p>&quot; & Application(&quot;comments3&quot;) & &quot;<p>&quot; & Application(&quot;comments4&quot;) & &quot;<p>&quot; & Application(&quot;comments5&quot;) & &quot;<p>&quot; & Request(&quot;comments&quot;)

End If
End If
%>

Please.. how could i get applications to work???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top