SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP error, help!

    Microsoft VBScript runtime error '800a0046'

    Permission denied

    /jen/next.asp, line 19



    heres my code:

    <%
    dim comments
    dim pic_num

    comments = request("pic_comments")
    pic_num = request("picture_number")

    const forappending = 8
    dim objopenfile, objfso, strpath
    strpath= server.mappath("picture" & pic_num & ".txt")
    set objfso = server.createobject("scripting.filesystemobject")

    if objfso.fileexists(strpath) then
    set objopenfile = objfso.opentextfile(strpath, forappending) 'LINE 19 !!
    objopenfile.write("'" & pic_comments & "'")
    objopenfile.writeblanklines(1)
    objopenfile.close
    set objopenfile = nothing

    else
    response.write("<p><b>error: did not write to file</b><p>")

    end if

    set objfso = nothing

    %>
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Permission denied sounds like the FSO you're trying to do. What directory permissions are there? If it isn't full or execute or whatnot you may need to change it
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


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
  •