Help needed with ASP form browse for file, create link to file and insert in access database

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Help needed with ASP form browse for file, create link to file and insert in access database

    I have a form where a user enters their name, date etc.
    i also want them to be able to click on a browse button and select a
    file which will then appear in a textbox. when they press submit i
    want the file name and path to be put into the database. e.g.
    "C:\windows\work\work.doc". Basically I don't want to UPLOAD the file
    just enable the user to browse to it and send the filename and path to
    the database.

    Any help would be appreciated,

    thanks
    Jon D Guest

  2. Similar Questions and Discussions

    1. read text file insert into database
      Hi, I have a tab delimited large text file in my server. I am trying to create a .CFM file to read the text file and insert into the database. ...
    2. Bug: Insert Link (Browse to Web Page) Error
      I was demonstrating Contribute to a client this morning and discovered that the "Browse to Web Page" feature does not work. Attempting to link to...
    3. Create a Browse to File Button
      I cannot for the life of me figure out how to do this. I upload a lot of images and it would be nice if I had that handy browse to file button to...
    4. insert flat file to database
      Hi, I need to import data from a flat file to the Oracle database. The file is not a csv file. The file is not a comma delimited file. It is a...
    5. Insert full path on browse file?
      Don't suppose you could post that code here? :)
  3. #2

    Default Re: Help needed with ASP form browse for file, create link to file and insert in access database

    <<
    I have a form where a user enters their name, date etc.
    i also want them to be able to click on a browse button and select a
    file which will then appear in a textbox. when they press submit i want
    the file name and path to be put into the database. e.g.
    "C:\windows\work\work.doc". Basically I don't want to UPLOAD the file
    just enable the user to browse to it and send the filename and path to
    the database.
    >>
    Here is a test file that works for me:

    <html>
    <body>

    <%
    ' If there was a post.
    If Request.Form.Count > 0 Then
    Response.Write "LName = " & Request.Form("LName") & "<br>"
    Response.Write "FileLocationOnClientPC = " &
    Request.Form("FileLocationOnClientPC") & "<br>"
    Else
    %>
    <form id="frmMain" name="frmMain" action="<%=
    Request.ServerVariables("SCRIPT_NAME") %>" method="post">
    LName: <input type="text" name="LName"><br>
    FileLocationOnClientPC: <input type="file"
    name="FileLocationOnClientPC"><br>
    <input type="submit" name="btnSubmit" value="Submit"><br>
    <%
    End If
    %>

    </form>
    </body>
    </html>

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Designer
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!

    Bullschmidt 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