473,545 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Ope n strSQL, ADOCon
......
Do While Not rsGuestbook.EOF

Response.Write (rsGuestbook("G uest"))
Response.Write ("  & nbsp)
HereThePictureM ustBeInserted
Response.Write ("<br>")
Loop
......

What we get depends what is instead of HereThePictureM ustBeInserted:

1. Response.Write (rsGuestbook("F lagPath") - 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 )
Jan 30 '08 #1
0 1276

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3622
by: dale zhang | last post by:
Hi, I am trying to read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp The article author is using PictureBox for windows application, while I am doing for web. I can only find Image from web forms control and HTML control. This may be the root cause of my problem. For...
4
3276
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any errors. After reading the ole object from db, I saved it to C: as file1.bmp and displayed on the web. But it can not be displayed. After I manually sent...
6
3025
by: David W. Simmonds | last post by:
I know that I can create an Image object by using a path like C:\MyPictures\pic.jpg, but how can I create an Image object by using a path like /MyPictures/pic.jpg where the path is relative to the site. For instance, if the site is http://www.foobar.com, then /MyPictures/pic.jpg would be fully qualified by...
5
2181
by: Haydnw | last post by:
Hi, I have the code below as code-behind for a page which displays two images. My problem is with the second bit of code, commented as " 'Portfolio image section". Basically, the SQL query gets details of a random image from an access database. I know this works because when I run the query in access, it picks a different image each time...
1
1946
by: news.microsoft.com | last post by:
Hello and first of all thank you for your time. I am currently developing an ASP.net web page, which has data stored in SQL Server. It is a web page for a State Agent and my problem is: I need to create an image gallery (with some kind of slide Next and Previous picture) of the flat you are interested to see. The pictures are stored on...
6
1901
by: Rudy | last post by:
Hello all! I am amazed how many posts I have read to store an image in SQL, and just as many against it. So I learned how to store an image in a SQL db and retrieve the image. A little tricky, but not too bad. But then I thought I wanted to try the other way, by putting the file location in SQL and storing the actual image in another...
3
2660
by: christiang | last post by:
Hi guys, I'd like to use Alexia thumbnail service. It's an interesting service, you pass an url to its cgi and you get a thumbnail of that url. Of course they don't have the screenshots of all the websites so I have to check if the image returned is fine or not. This is not that problematic, I can read the headers and understand if it is a jpg...
2
4113
by: Adam Teale | last post by:
hey guys Is there a builtin/standard install method in python for retrieving or finding out an image's dimensions? A quick google found me this: http://www.pythonware.com/library/pil/handbook/introduction.htm but it looks like it is something I will need to install - I'd like to be able to pass my script around to people without them...
2
1611
by: keerthisreenu | last post by:
hai to all...!! iam working with Ms Access 2000. iam saving an image in the database. After that i want to retrive the same image from database and displaying it in the picture box. but its not working. why it is happening? please help me. iam sending the code. when button1 clicks it store in database. when button2 clicks it should...
0
7432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.