Display Images in Results asp

  • Thread starter Thread starter Susan C
  • Start date Start date
S

Susan C

I'm trying to display pictures for records using an Access
database. I was able to do it when I followed
instructions on creating a new web & using the northwind
database; however, I created my own database using the
database interface wizard (I have a submit form, database
editor and the results in the folder now), I added images
to the database for each record, I went into
the "results.asp" page, deleted the component and inserted
one of the images, right clicked on it and changed the
parameters, removed the path, inserted the field
parameter. Saved it, uploaded it and I don't get the
photo. I tried adding the image, changing the path etc...
in the database editor.asp.... that didn't do the trick
either. Could someone tell me what I'm missing?
 
-----Original Message-----
I'm trying to display pictures for records using an
Access database. I was able to do it when I followed
instructions on creating a new web & using the northwind
database; however, I created my own database using the
database interface wizard (I have a submit form, database
editor and the results in the folder now), I added images
to the database for each record.

Please explain how you added these images to the database
(more on this below).
I went into the
"results.asp" page, deleted the component and inserted
one of the images, right clicked on it and changed the
parameters, removed the path, inserted the field
parameter. Saved it, uploaded it and I don't get the
photo. I tried adding the image, changing the path
etc... in the database editor.asp.... that didn't do the
trick either. Could someone tell me what I'm missing?

If at all possible, *don't* put picture bits directly in
your database records. Instead, store the picture file
name in a text field. Then, code a custom query (either in
Access or the DRW) that creates <img> tag for each
picture. Here's an example, targeting the DRW. (An Access
query would use quotes rather than apostrophes>)

SELECT '<img src=images/' & [picfilename] & '>' as
imgtag, ...

Then, once you <img> tags coming out, right-click the
column in FrontPage, choose Database Column Value
Properties from the shortcut menu, and select Column Value
Contains HTML.

If you absolutely *must* keep the image bits in the
database, you have some serious programming tasks ahead of
you. If you need help getting started on this track, post
again to this thread.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Hi! I didn't add the image to the database, just the
picture file name. I can get the picture to populate in
the results.asp when I don't involve the database wizard.
I simply followed the instructions available at
http://support.microsoft.com (318813 HOW TO) I put the
image file name in the database field, then go into the
results.asp, locate the database column I called photo,
deleted the column value, inserted the image, went into
picture properties, removed the path there and inserted
field parameter. THIS WORKS. What I don't understand is
why when I use the "database interface wizard" which I
want to use because it creates the login.asp and the
database editor.asp, this procedure doesn't work. I'm
thinking I may need to change something else in those
files.
 
Susan C said:
Hi! I didn't add the image to the database, just the
picture file name. I can get the picture to populate in
the results.asp when I don't involve the database wizard.
I simply followed the instructions available at
http://support.microsoft.com (318813 HOW TO) I put the
image file name in the database field, then go into the
results.asp, locate the database column I called photo,
deleted the column value, inserted the image, went into
picture properties, removed the path there and inserted
field parameter. THIS WORKS. What I don't understand is
why when I use the "database interface wizard" which I
want to use because it creates the login.asp and the
database editor.asp, this procedure doesn't work. I'm
thinking I may need to change something else in those
files.

I would bring up the page that's not working, do a
View Source, and see what's showing up in the <img>
tags for the broken pictures. I suspect you'll find
a wrong path. If so, you'll have to monkey around
with the picture location under Picture Properties,
General.

If, for example:

o The FavoriteImage field is putting out picture locations
like images/mycat.jpg and images/mount.gif, but

o Your DRW page is in a folder two levels deep from your
root.

Then you might have to specify
../../<%=FP_FieldLink(fp_rs,"FavoriteImage ")%>
rather than just.
<%=FP_FieldLink(fp_rs,"FavoriteImage ")%>
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

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

Back
Top