Appending Text to File - Please Help!!!

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Appending Text to File - Please Help!!!

    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

    -----------------------------
    This message is posted by [url]http://Asp.ForumsZone.com[/url]

    Tapanan Yeophantong Guest

  2. Similar Questions and Discussions

    1. Multiple Handle on same file for appending
      Hi, Is it possible to open multiple textstream on a same file for appending lines ? I would like to manage a logfile for my application that...
    2. Appending text file
      Hello everyone, I need to append the begining of an .asp file using the File System Object. I can write the entire file line-by-line and save it,...
    3. appending an XML file from CFMX 6.1
      can someone tell me the easiest way to write information to the end of an existing XML file using CFMX 6.1? I have an XML file which specifies...
    4. text field including text from a text file *.txt
      Hi, I would like to insert a text field which includes text from a text file. I know it must be possible but unfortunately I cannot find any help...
    5. Appending at various locations.
      I have to ask the user to input any two digits e.g input= 3,5 (their value can be upto 300-whole numbers only). These two numbers have to be...
  3. #2

    Default Re: Appending Text to File - Please Help!!!

    [url]http://www.aspfaq.com/2180[/url]

    Ray at home

    "Tapanan Yeophantong" <tapanan@hotmail.com> wrote:
    > IIS seems to be taking an infinite amount of time to respond (and it never
    did).
    > Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")

    Ray at Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139