473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

display images in asp from path in SQL database

Good day
I have an SQL DB with an unique code for a record and a path to an image that is stored in the server root directory. The image name is the stored with the corresponding record name. How do I display the images per record name?
Jul 10 '06 #1
1 3320
sashi
1,754 Expert 1GB
hi there,

is the image physical path specified? you can use the <src> tag to display the image on an .HTML form..

since you already have the name of the image am sure you have an id value defined for every image.. rite?? now with a script to list down all the image names together with their unique id value..

when i link is clicked.. you can redirect them to a different page.. pass along the image name as well as the unique id value using querystring.. i.e.

Expand|Select|Wrap|Line Numbers
  1. <a href="somepage.asp?id=<%RS("id")%>&<%=RS("ImageName")%>><%=RS("ImageName")%></a>
  2.  
now on some page capture the unique id value as well as the image name

Expand|Select|Wrap|Line Numbers
  1. Dim nID, sImageName
  2.  
  3. nID = Request.QuesryString("ID")
  4. sImageName = Request.QuesryString("ImageName")
  5.  
now.. since you are able to capture the unique id as well as the image name.. do a little SQL magic to pull out the image path from the database based on the unique id value and the image name..

well.. i you don't have any unique id value.. you can use the image name you do this.. provided you image name is unique as well.. give is a try.. got an idea now?? good luck my fren.. :)
Jul 10 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: david | last post by:
Hi, I have asp pages running from a MySQL database. I have placed a path in the required field (although not quite sure on the correct format). My asp page is just displaying the text path...
3
by: Ken | last post by:
I have a database called autographs.mdb that is in the "XYZ" folder in the "database" folder. I have a form in the database that I want to display a photo of the celeb on. The photos are in a...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
2
by: John Do | last post by:
Hi, I want to store the path and the name of the images in a sql 2000 database and all the images in a folder named images. And then I want to display all the images in a datagrid. Does any one...
3
by: Mark | last post by:
Hello all - I'm at wits end with trying to figure out why I'm having this problem since I followed the research, that I've dug up, to a "T". I'm trying to display a JPEG image from a path...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
9
by: Confused but working on it | last post by:
Just wanted to say thanks for the posts helping me make ths work. Added a few comments and after the readdir used a pattern match to test for ..jpg, and seems to work fine on my test setup. Maybe I...
2
by: pozze | last post by:
Hi, I need to display images and other record information retrieved from an SQL 2005 database in a datagrid on a web page. I'm coding in VB .net I have recently changed over from VB ASP and i'm...
1
by: cs_in_va | last post by:
I have been reading info on putting images inside vs out side the data and just using a path name. I want to use the later, but having some difficulties. Here is what I have. I have a database...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.