Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 9th, 2005, 02:51 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying images

Hey

I was just wondering does anybody know how to display multiple images from a sql database. The images are stored in Binary, i am having a problem displaying them.

  #2 (permalink)  
Old May 4th, 2005, 03:00 AM
Authorized User
 
Join Date: Jul 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raj_makro
Default

        response.contenttype = "ima Response.AddHeader "Content-Disposition", "attachment;filename=" & objResumeDocRs.Fields("source_file_name")
      Response.BinaryWrite objResumeDocRs.Fields("data").GetChunk(objResumeDo cRs.Fields("data_size"))


Regards
Raj
  #3 (permalink)  
Old May 4th, 2005, 03:08 AM
Authorized User
 
Join Date: Jul 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raj_makro
Default

Hi
 Ignore the earlier reply. The code is as follows
Response.contenttype = "image/GIF" 'for gif. Can use image/jpeg for jpg images
Response.AddHeader "Content-Disposition", "attachment;filename=" & "<file-name>"
Response.BinaryWrite RecordSetObject.Fields("<field_name_where_data_is_ stored>").GetChunk "<size of file>"



Regards
Raj


Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying images chandan121 JSP Basics 0 May 1st, 2008 09:59 PM
Displaying images...... kethireddy435 ASP.NET 2.0 Professional 0 September 16th, 2007 09:25 PM
displaying images and information cherniin J2EE 0 April 23rd, 2007 01:12 AM
Displaying Images From Database Metalore BOOK: Beginning ASP.NET 2.0 and Databases 1 November 1st, 2006 11:45 AM
Images not displaying Penn_Clark Dreamweaver (all versions) 3 February 21st, 2006 12:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.