log file cdonts

Results 1 to 2 of 2

Thread: log file cdonts

  1. #1
    Join Date
    Dec 1969

    Default log file cdonts

    What would be the easiest way create a log file that would continuously add to the file. i.e. i have a page that loops thru the recordset and each time the email is sent a new logfile is created. I&#039;m guessing it would be a collection of strLog = strLog & objTec("e_mail") but only create the file when it reaches the end of the recordset. Am I on the right path?<BR><BR><BR>MyFileName = Server.MapPath("MyLogFile"& val1 &".txt")<BR><BR>Set FSO = Server.CreateObject("Scripting.FileSystemObject") <BR>Set TS = FSO.OpenTextFile(MyFileName)<BR> <BR> &#039; Store all the required information in a string Called strLog<BR> strLog = "<BR>&#060;P&#062;&#060;B&#062;" & NOW() & "&#060;/B&#062; " <BR> strLog = strLog & objRec("e_mail")<BR><BR> Set TS = Nothing <BR> Set FSO = Nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: log file cdonts

    That looks good to me and then you could use the FileSystem object to write the .txt file to the server drive...attach to email, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts