How To Reference Images With No File Name Fields &

Results 1 to 2 of 2

Thread: How To Reference Images With No File Name Fields &

  1. #1
    Join Date
    Dec 1969

    Default How To Reference Images With No File Name Fields &

    Urgently seeking help how to reference dymanic images stored in a separate directory but whose file names are NOT stored in any field/column of the database---i.e., there&#039;s no field in the db that stores either the filename or the path (URL) to the images. There are thousands of records and of course their corresponding images, so manual input is out of the question (plus, records and images continue to grow by the day). Each record in the db is uniformly identified with a number, ex. A12345, and their associated image files (5 per record) are named identical to the record they belong to like A12345a.jpg, A12345b.jpg, and so on.<BR><BR>I tried this,<BR><BR>Dim ImageURL <BR>ImageURL = "/images/" & (rsImages.Fields.Item("ID").Value) & ".jpg"<BR><BR>&#060;Img Src ="&#060;%=ImageURL%&#062;"&#062;<BR><BR>but the same image (from the first record) appears for all the records, rather than distinct images corresponding to each record.<BR><BR>Will be extremely grateful for any help.

  2. #2
    Join Date
    Dec 1969

    Default You messed up the code...

    What you have is basically correct. I would just guess that you didn&#039;t put the assignment to the ImageURL variable *INSIDE* the DO or WHILE loop. Yes? <BR><BR>Putting it outside the loop means that, indeed, you will assign the value of the *first* record to ImageURL. And then it will not change inside the loop.<BR><BR>I am guessing, of course, since you didn&#039;t see fit to grace us with your code. But I&#039;d bet a dollar or two that this (or something very close to it) is the problem.<BR><BR>

Posting Permissions

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