Create image with path read from query

A

Arvi Laanemets

Hi


We are trying to create a simply ASP code, which creates guests list from
Access database, and displays a country flag for every guest. All flag
images are stored as *.gif in subfolder Flags. In access database, in a text
field, the gif-file name along with relative path is stored (like
"Flags/US.gif" or "Flags/Fra.gif"). The ASP code uses an Access query as
source, where paths to picture files are represented like "./Flags/US.gif"
or "./Flags/Fra.gif", etc.

At moment our code is like

......
strSQL = "SELECT Guest, FlagPath FROM qGuestsToday;"
rsGuestbook.Open strSQL, ADOCon
......
Do While Not rsGuestbook.EOF

Response.Write (rsGuestbook("Guest"))
Response.Write ("  &nbsp)
HereThePictureMustBeInserted
Response.Write ("<br>")
Loop
......

What we get depends what is instead of HereThePictureMustBeInserted:

1. Response.Write (rsGuestbook("FlagPath") - the guests and the paths to
picture files from query are displayed;
2. Response.Write "<IMG SRC = ""./Flags/US.gif"" Width = ""45"" Height =
""30"" >" - the guests from query are displayed, trailed with US flag image;
3. Any attemps to greate an image tag using query field FlagPath as image
path - some error is returned.

Thanks in advance for any helpful suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top