Trouble displaying images

Results 1 to 2 of 2

Thread: Trouble displaying images

  1. #1
    Join Date
    Dec 1969

    Default Trouble displaying images

    Hi - could someone please assist me. <BR><BR>I&#039m using FrontPage 2000 with PWS and Access 2000.<BR><BR>I cannot get images to display on an ASP after being returned by the database.<BR><BR>THIS IS WHAT WORKS - without the code going via Access 2000 - on page one I have the following code<BR><BR>&#060;img src="images/waterfall.jpg"&#060;%Response.Write(strImage)&#062 ;%"&#062; <BR><BR>where &#039waterfall image&#039 resides within FrontPage image folder. If I preview &#039page one&#039 in browser the image is<BR>displayed without any problems. <BR><BR>WHAT DOESN&#039T WORK - if I insert the same code into a field on my database - query the database, the<BR>database returns the correct records BUT NOT the image - in place of the image I&#039ve got the original code i.e.<BR>&#060;img src="images/waterfall.jpg"&#060;%Response.Write(strImage)&#062 ;%"&#062; <BR><BR>It seems the ASP is not even acknowledging that the images exist, why is this? what am I doing wrong?<BR><BR>A dummy explanation would be appreciated as this is a steep learning curve for me.<BR><BR>Also while I&#039m here - what does "strImage" as in Response.Write above actually mean.<BR><BR>Cheers - Stephen <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Trouble displaying images

    All you need to store in the db is the path to the image file (e.g. images/imagename.jpg). Then when you go to display it, do something like this. Where rst("imagefieldname") is the field in the db where the path and name are stored from the query.<BR><BR>&#060;%<BR>...<BR><BR>Response.Write "&#060;IMG SRC=&#039" & rst("imagefieldname") & "&#039&#062;"<BR><BR>...<BR>%&#062;<BR><BR>strImag e is a variable probably set to rst("imagefieldname")<BR><BR>HTH<BR><BR>Jerry

Posting Permissions

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