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. Web Development
  3. ASP.NET
  4. Displaying image from Access DB

Displaying image from Access DB

Scheduled Pinned Locked Moved ASP.NET
databasecomdata-structureshelptutorial
2 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    shreekar
    wrote on last edited by
    #1

    Hi I know how to display an image in a web page by reading it from DB. However, I am not sure what format the image is stored in database. I am reading it in a byte array and sending the byte array to the response stream with the content type set to gif (also tried with bmp). The result is a blank image placholder (one shown when the image is not found). I also tried to save it to a file and reference the file in the web page with the same result. The OS refuses to open the file as an image. Has this something to do with specifically Access? I am using the Northwind Access DB for some learning purpose. Any help is appreciated.

    Shreekar http://shreekarishere.blogspot.com

    P 1 Reply Last reply
    0
    • S shreekar

      Hi I know how to display an image in a web page by reading it from DB. However, I am not sure what format the image is stored in database. I am reading it in a byte array and sending the byte array to the response stream with the content type set to gif (also tried with bmp). The result is a blank image placholder (one shown when the image is not found). I also tried to save it to a file and reference the file in the web page with the same result. The OS refuses to open the file as an image. Has this something to do with specifically Access? I am using the Northwind Access DB for some learning purpose. Any help is appreciated.

      Shreekar http://shreekarishere.blogspot.com

      P Offline
      P Offline
      postmaster programmingknowledge com
      wrote on last edited by
      #2

      There is an example based on SQL Server at http://www.programmingknowledge.com/ImageUpload.aspx[^]. You will need to do some changes to work with Access Database. Good Luck

      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