I am trying to create a log file to store access attempts to a secure site
using ASP pages. The code below works fine when the OpenTextFile is replaced
with CreateTextFile and the arguments are removed from the end (, For
Appending, TristateTrue). However I want it to open an existing file and
amend the data in that file.
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(Server.MapPath ("/infocentre/log") & "\log",
ForAppending, TristateTrue)
f.WriteLine(date & " " time & " " & request.Servervariables("REMOTE_HOST")
& " " & request.Servervariables("SERVER_SOFTWARE") & " "
request.form("txtName") & " " & request.form("txtPassword"))
f.Close
The error displayed by the browser is "Invalid procedure call or argument"
Any help appreciated.
Regards
Paul
[EMAIL PROTECTED]
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz