
February 22nd, 2001, 06:21 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : kr</b></i><br />Hi,<br /> You can use Filesystemobject in your asp code to this.<br /><br />here is the example. I assume date,messaeg are the fields in the same order.<br /><br />const forreading =1<br />set fso = server.createobject("scripting.filesystemobject")<br />set f = fso.opentextfile(:c:wwwroot estfile.txt", forreading)<br />do while not f.atendofline <br />strinfo = f.readline<br />strdate = mid(strinfo,1,(instr(1,strinfo,",")-1))<br />if strdate = now() then<br /> REsponse.write mid(strinfo,instr(1,strinfo,",")+1))<br />end if<br />loop<br /><br /><br />------------<br />stacey at 2/20/2001 10:11:03 AM<br /><br />I have created a form that post two fields(date and message) to a TXT file database using commas as the seperator. I now need help reading the Dta into my asp page. I would like to use a If then To check and compare the date filed with the server date. If they match the the default header and the message will be displayed if the date matches. If the date does not match the It will leave a message "no new messages". If someone could help <br />
|