Displaying image from Access DB
-
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
-
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
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