Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to use a FileInfo control to add a filename to an Access database

How to use a FileInfo control to add a filename to an Access database

Scheduled Pinned Locked Moved Database
databasetutorialquestion
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rodgerm
    wrote on last edited by
    #1

    I'm trying to add both text and a picture filename to an Access database. The actual .jpg file is stored separately in another folder. I want to use a File control in classic ASP to do this. If I create a page for the text fields and a separate page for the File control, everything works fine but the users are confused by having to go to two pages. Ideally, they would use the Browse button of the File control to select their picture then the picture's filename would be passed down to the "ImageLink" field in the database Insert SQL command. Any ideas? Here's my two sections of code:

    Country:

    Description:
    (255 char. max)

    Price:
    Numbers only with optional decimal point

    Your Name:

    Contact Info:
    (255 char. max)

    More Info:
    (255 char. max)

    Picture Filename:
    Do not include spaces in the filename
    Be sure to include extension (.jpg)

    Second page code:

    Please select picture to be saved for this item:

    L 1 Reply Last reply
    0
    • R rodgerm

      I'm trying to add both text and a picture filename to an Access database. The actual .jpg file is stored separately in another folder. I want to use a File control in classic ASP to do this. If I create a page for the text fields and a separate page for the File control, everything works fine but the users are confused by having to go to two pages. Ideally, they would use the Browse button of the File control to select their picture then the picture's filename would be passed down to the "ImageLink" field in the database Insert SQL command. Any ideas? Here's my two sections of code:

      Country:

      Description:
      (255 char. max)

      Price:
      Numbers only with optional decimal point

      Your Name:

      Contact Info:
      (255 char. max)

      More Info:
      (255 char. max)

      Picture Filename:
      Do not include spaces in the filename
      Be sure to include extension (.jpg)

      Second page code:

      Please select picture to be saved for this item:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Why are you asking the user for a filename when all you need is the upload selector? Once the image is uploaded to the server you have the filename which you can then add to your database.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups