vbScript problem

Results 1 to 2 of 2

Thread: vbScript problem

  1. #1
    Join Date
    Dec 1969

    Default vbScript problem

    I am working on create error handling to report all the error occures.<BR>I am using the following function to write the ErrFile.txt, the problem <BR>i have it keep overwrite the first line, so i just get the last message, <BR>and in one line. Here the code i am using to write tot he ErrFile.txt<BR><BR>sub WriteToLog(strMessage, strLogMessage, intLogType)<BR><BR>set Logfso = createobject("scripting.FileSystemObject")<BR>set Logf = Logfso.OpenTextFile("C:BatchDealerInventorySylFile .txt", ForWriting, True) <BR>Logf.writeLine strMessage & strLogMessage & intLogType <BR><BR>end sub<BR><BR>whereever i expect an error i call WriteToLog(strMessage, strLogMessage, intLogType)<BR>but the value I assign to every one of thes variable is different the quesion again is I just<BR>get the last error message and on one line.

  2. #2
    Join Date
    Dec 1969

    Default RE: vbScript problem

    Use ForAppend (8) instead of ForWriting.

Posting Permissions

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