Results 1 to 2 of 2

Thread: Display an image based on pathname

  1. #1
    Join Date
    Jun 2005

    Display an image based on pathname

    Hi Folks,

    I'm playing with the notion of maintaining a database with an inventory table. One of the fields in the inventory table is for the image associated with an item, and the fieldname="loc".
    That field is text based so it'll read "..\data\OneOfManyImages.gif"

    Correct me if I'm wrong...

    Dim objConn, rsSigns
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.Open "inventory"
    Set rsSigns = objConn.Execute("SELECT * FROM inventory WHERE fam ='Decorative Signs' ")
    rsSigns is a recordset containing all of the records in inventory where the fam field is "Decorative Signs" and the value of rsSigns("loc") would be "..\data\OneOfManyImages.gif"

    Question: What is the right syntax to display the image? The following statement isn't right:
    <img src=rsSigns("loc") width="140" height="140" border="0">

    Thank you,

  2. #2
    Join Date
    Dec 2003
    England, UK
    <img src="<%=rsSigns("loc")%>" width="140" height="140" border="0">

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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