Opening A Text File And Writing To It

Results 1 to 3 of 3

Thread: Opening A Text File And Writing To It

  1. #1
    pnub Guest

    Default Opening A Text File And Writing To It

    I am getting frustrated yet again becuase I cannot open a text file that does exist and write to it. I keep getting a Permission Denied error at the following line (where ForWriting = 2):<BR><BR>Set strFile = objFile.OpenTextFile("d:area23wwwcgi-bin\"&id&".ini", ForWriting, True)<BR><BR>Can anybody help me understand why I cannot write to this file?<BR><BR>Thanks in advance,<BR>pnub

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Opening A Text File And Writing To It

    Chances are the write permissions for that directory are not set. Using the IIS 4 Admin Tool, right click on the directory you want to write to, and check the Write permission checkbox.<BR><BR>That should do it! (Or, if you are being hosted from some company, ask them to grant write permissions to the directory you are needing to write to.)

  3. #3
    pnub Guest

    Default RE: Opening A Text File And Writing To It

    Yes, I have done that...I have contacted my host and they have set the write permissions. I can write files perfectly ok but when I go to open them up later and write to them, I can&#039t do that...that is when I get the Permission Denied error...I can&#039t open an already created file and write to it...why?

Posting Permissions

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