Appending Text to File - Please Help!!!

  • Thread starter Tapanan Yeophantong
  • Start date
T

Tapanan Yeophantong

What''s wrong with this code? The IIS seems to be taking an infinite amount of time to respond (and it never did). Please Help!

Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
strPath = "C:\AuditIS\System.log"
If (objFSO.FileExists (strPath)) Then
Set objOpenFile = objFSO.OpenTextFile (strPath, 8)
Else
Set objOpenFile = objFSO.CreateTextFile (strPath)
objOpenFile.WriteLine ("User / Type of Access / Source / Source ID / Time of Access")
End If

objOpenFile.WriteLine Session("Username") & " / " & "Created" & " / " & "Project" & " / " & strPrjId & " / " & Date & " " & Time
objOpenFile.Close
Set objOpenFile = Nothing
Set objFSO = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top