Retrieving image from sql thru asp

Results 1 to 2 of 2

Thread: Retrieving image from sql thru asp

  1. #1
    jitin narula Guest

    Default Retrieving image from sql thru asp

    i have a database in sql7.0 ,one of the field name is itempicturefile in that i have given the name of the image like abc.gif. Now i want to retreive this picture, which i have saved under the same folder as of asp files . As in the case of search engine we r putting the linked name mentioned in the database and along with that i want to show the image as well .<BR>pls help asap.

  2. #2
    Join Date
    Dec 1969

    Default RE: Retrieving image from sql thru asp

    open up a recordset however you usually do with the itempicterefile field in it and use:<BR><BR>imgFile = rs.Fields("itempicturefield")<BR><BR>and put the img tag in you page like so:<BR><BR>&#060;img src="&#060;%=imgFile%&#062;" border="" etc.<BR><BR>assuming your picture file is in the same folder as the script file, otherwise stick the path in before the script delimiters.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts