Create image with path read from query

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 ("<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.

--
Arvi Laanemets
( My real mail address: arvi.laanemets<at>tarkon.ee )
Arvi Laanemets [ Mi, 30 Januar 2008 10:52 ] [ ID #1919876 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Create image with path read from query

Vorheriges Thema: Get Controls
Nächstes Thema: 'Sys' is undefined