|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
What's wrong with this code?
<i><b>Originally posted by : krazy (railz_mem@hotmail.com)</b></i><br />This is the code I use for my text file based counter I created. Can someone tell me what's wrong with it?<br /><br /><script language="VBScript" runat="Server"><br /><br />Sub Session_OnStart<br />Dim strCurr<br />Dim strNew<br />Dim intCurr<br />Dim intNew<br />Set FSO = CreateObject("Scripting.FileSystemObject")<br />Set TEXT = OpenTextFile("C:http
rzcounter.txt",3)<br />strCurr = TEXT.ReadLine<br />TEXT.Close<br />intCurr = CInt(strCurr)<br />intNew = intCurr + 1<br />strNew = CStr(intNew)<br />Set TEXT = OpenTextFile("C:http rzcounter.txt",3)<br />TEXT.WriteLine(strNew)<br />TEXT.Close<br />End Sub<br /><br /></script><br /><br />The calls that look like they're on 2 lines are actually on one.<br /> |
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : steve</b></i><br />http://aspfree.com/asp/startpage.asp?id=45<br /><br />look at this demo it has a text counter example you can see and download.<br /><br />steve<br /><br /><br />------------<br />krazy at 4/26/2000 1:20:25 PM<br /><br />This is the code I use for my text file based counter I created. Can someone tell me what's wrong with it?<br /><br /><script language="VBScript" runat="Server"><br /><br />Sub Session_OnStart<br />Dim strCurr<br />Dim strNew<br />Dim intCurr<br />Dim intNew<br />Set FSO = CreateObject("Scripting.FileSystemObject")<br />Set TEXT = OpenTextFile("C:http
rzcounter.txt",3)<br />strCurr = TEXT.ReadLine<br />TEXT.Close<br />intCurr = CInt(strCurr)<br />intNew = intCurr + 1<br />strNew = CStr(intNew)<br />Set TEXT = OpenTextFile("C:http rzcounter.txt",3)<br />TEXT.WriteLine(strNew)<br />TEXT.Close<br />End Sub<br /><br /></script><br /><br />The calls that look like they're on 2 lines are actually on one.<br /> |
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : krazy (railz_mem@hotmail.com)</b></i><br /><br />That's exactly where I got the code from I was asking what's wrong with it.<br /><br />------------<br />steve at 4/28/2000 2:52:42 PM<br /><br />http://aspfree.com/asp/startpage.asp?id=45<br /><br />look at this demo it has a text counter example you can see and download.<br /><br />steve<br /><br /><br />------------<br />krazy at 4/26/2000 1:20:25 PM<br /><br />This is the code I use for my text file based counter I created. Can someone tell me what's wrong with it?<br /><br /><script language="VBScript" runat="Server"><br /><br />Sub Session_OnStart<br />Dim strCurr<br />Dim strNew<br />Dim intCurr<br />Dim intNew<br />Set FSO = CreateObject("Scripting.FileSystemObject")<br />Set TEXT = OpenTextFile("C:http
rzcounter.txt",3)<br />strCurr = TEXT.ReadLine<br />TEXT.Close<br />intCurr = CInt(strCurr)<br />intNew = intCurr + 1<br />strNew = CStr(intNew)<br />Set TEXT = OpenTextFile("C:http rzcounter.txt",3)<br />TEXT.WriteLine(strNew)<br />TEXT.Close<br />End Sub<br /><br /></script><br /><br />The calls that look like they're on 2 lines are actually on one.<br /> |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > What's wrong with this code? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|