Professional Web Applications Themes

ASP textfile edit problem - ASP Database

In order to yse what visitors of an ASP (classic) site are looking for, the keywords for looking in the Access databasa, are written down in a textfile at the server. The textfile is in a folder with write permission. When the textfile is too large, I want to delete the content of it. When I delete the file, automatically the write permission of the folder will be gone and I have to ask my provider to correct it. I think thats a little bit awkward and that's why I am looking for a way to erase the content of ...

  1. #1

    Default ASP textfile edit problem

    In order to yse what visitors of an ASP (classic) site are looking for,
    the keywords for looking in the Access databasa, are written down in a
    textfile at the server. The textfile is in a folder with write permission.
    When the textfile is too large, I want to delete the content of it. When I
    delete the file, automatically the write permission of the folder will be
    gone and I have to ask my provider to correct it.

    I think thats a little bit awkward and that's why I am looking for a way to
    erase the content of the textflie without deleting the file. I've heard this
    can be done by using the objstream method. This shout offer the oportunity
    to overwtite existing text in a file.

    I do not know how I can achieve this. Can someone give me an example with a
    simple explantion since I am not realy a crack.

    Thanks in advance


    Basr Guest

  2. #2

    Default Re: ASP textfile edit problem

    On Tue, 17 Aug 2004 12:26:41 +0200, "Basr" <nl> wrote:
     

    Overwrite it with a blank file... :)

    Jeff
    Jeff Guest

  3. #3

    Default Re: ASP textfile edit problem


    To my opinion is overwriting the file the same as delete and create in
    succession. Is that wrong?
    Marcel


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    M-ar Guest

  4. #4

    Default Re: ASP textfile edit problem

    M-ar wrote on 17 aug 2004 in microsoft.public.inetserver.asp.db:
     

    If however, as the OP said earlier,
    the write permission of the FOLDER (!!) was reset,
    perhaps he/she should leave a dummy file in the same folder.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan. Guest

  5. #5

    Default Re: ASP textfile edit problem

    On Tue, 17 Aug 2004 10:21:55 -0700, M-ar <com> wrote:
     

    Well, except for not having the same permission needs, it's pretty
    much the same thing. If you're doing a create of the file, then it
    may balk if the file exists, but depending on your method of writing
    the file that can be overcome pretty easily.

    Jeff
    Jeff Guest

  6. #6

    Default Re: ASP textfile edit problem


    I found a solution for the problem. When I use the OpenTextfile
    statement I have to give a parameter.
    This can be 1 for read, 2 for write and 3 for append. If I had used my
    brains I could haven known that write means overwrite. This was not
    mentioned in my book, but I could have known it otherwise there was no
    difference with the append parameter.

    Thank you all for you alternative solutions.
    Marcel


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    M-ar Guest

Similar Threads

  1. Select * from textfile.txt
    By h3m3r0id in forum Coldfusion Database Access
    Replies: 1
    Last Post: April 28th, 08:52 AM
  2. Can a .swf file moniter for textfile changes?
    By trints in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 29th, 02:40 AM
  3. create textfile using asp
    By rajesh_tamilan@yahoo.co.in in forum ASP
    Replies: 1
    Last Post: August 24th, 08:07 PM
  4. Read textfile
    By news.planet.nl in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 26th, 11:03 PM
  5. Replies: 1
    Last Post: July 26th, 12:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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