Create image with path read from query

Create image with path read from query

am 30.01.2008 10:52:02 von 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 ("   )
HereThePictureMustBeInserted
Response.Write ("
")
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 " ""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.

--
Arvi Laanemets
( My real mail address: arvi.laanemetstarkon.ee )