• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 512
  • Last Modified:

Getting database results wizard to display photos stored/referenced within an Access 2003 database

Using FrontPage 2003 database results wizard to display photos stored or referenced within an Access 2003 database.

Does anyone know about using the FrontPage 2003 database results wizard in conjunction with an Access 2003 database in relation to displaying photographs held in (or referenced by) a field within a table in the database?

Specifically I want to know how to get one column of a database results list (showing one record per row) to display a photograph extracted from the database.  And how to get the photograph (or an address somehow referencing the photograph) into the database in the first place, so that the photograph can be extracted and displayed by the database results wizard.
(The database tables and fields are being generated automatically as a result of completion of a form on an .asp page of the website).
1 Solution
I do not think you can display the image directly from the database. I have made several attempts and it will not draw the picutre because access does not actually store the image in the table - it stores a path to it instead. The following procedure shows you how to get a picture to display based on the information in the database (i.e. picturename.jpg). FP 2003 has fileupload capability and you can have a user upload the file and write to the database with the filename and then the results page can automatically link to the picture. Hope this helps.


Here is a process for displaying the picture but the file must reside on the webserver.

To display an image using data from a database, follow these steps:

Create a new page, and name it "displayimages.asp" (without the quotation marks).

On the Insert menu, point to Database, and click Results.

In Step 1 of the Database Results Wizard, click the Use an existing database connection button, and click to select Database from the list. Click Next.

In Step 2 of the Database Results Wizard, make sure the Record Source option is selected and YourTable is selected from the list. Click Next.

In Step 3 of the Database Results Wizard, click Edit List.

In the Displayed Fields dialog box, remove unwanted fields.

In Step 4 of the Database Results Wizard, click Next.

In Step 5 of the Database Results Wizard, click to select the Display all records together option, and click Finish.

Locate the database column value that reads "<<Image>>" and delete it.

In the table cell that you just removed the column value from, insert the a picture from the images folder by using the Picture command on the Insert menu. This places the lion image in the table.

Right-click the image you just inserted, and click Picture Properties.

Under Picture Source, click Browse, and then click Parameters.

In the path field, remove the current path and then click Insert Field Parameter and select Image.

Click OK three times. You see a small broken image icon in the column under PicName.

Save the page as something.asp on the File menu.
Hi guys, I may be all wet here but if Jeeva stored the picture in an embedded OLE rather then a link wouldn't it display then?
I am sure it would definently be slower but it might be easier.  I havent tested this though, just an idea! :)
I tried the OLE method and it will not display the picture.

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Cool, sorry about that :(
JeevaAuthor Commented:
Thanks very much rcmb.

Sorry for the long delay in replying, but I feel I can’t keep you in the dark any longer waiting for this issue to be completely resolved.  I like to respond to experts as soon as possible within a day or two at the most when I can.  Your explanation seems to be very good, so I am awarding you the points for your response, even though I have as yet been unable to test the method.  This is because I have been having more basic trouble getting the FP2003 file upload feature to work!

(I had the FP2003 form functioning well, updating the Access database  records, but not attempting file uploading.  But as soon as I added the file upload feature, nothing worked again.  I did not get the usual default Microsoft confirmation page displayed, the database was not updated, no photo was uploaded to the specified folder on the server (which did have its flags altered to accept uploading) and there was no error message.  Instead, the system returned me to the form page of the website, with all fields emptied ready for me to key in further database record details;  and so on, round and round the loop with nothing happening to the database.

My ISP is looking at why the failure occurs.  He does not think it is because he has only FP2002 (rather than FP2003) server extensions installed on his NT server).


Thanks for the points and trusting the information. If you have problems just post back here and I will walk you through any issues.

Not sure what the problem is on the file upload. You do not need FP2003 server extensions even though you are using FP2003. To use the file upload all you need is FP2002 server extensions and permissions set correctly on the folder. Here are basic procedures for setting up a file upload form. Test these to see if the system works. At the bottom is a link to a white paper for setting up file upload and writing to a database.

Creating the Upload Page

Start Microsoft FrontPage. To do this, point to Programs on the Start menu, and then click Microsoft FrontPage.

Create or open a Web.

To create a new Web, follow these steps:

On the File menu, point to New, and then click Page or Web.

In the New Page or Web task pane, click Empty Web.

In the Web Site Templates dialog box, click the Empty Web icon and click OK.

To open an existing Web, click Open Web on the File menu. In the Open Web dialog box, select the Web you want to open, and then click Open.

On the View menu, click Page.

On the File menu, point to New, and then click Page or Web. In the New Page or Web task pane, click Blank Page to create a new HTML page.

On the File menu, click Save. Name the file Upload.htm and then click Save. The page appears in the Folder List pane and it is also open for editing.

On the View menu, click Folders. On the File menu, point to New and then click Folder. A new folder appears in your Web. The cursor is positioned for you to type the folder name. Type Uploads and press ENTER.

Right-click the new folder and then click Properties on the menu that appears. In the Properties dialog box, click to clear the Allow scripts or programs to be run check box. Make sure the remaining check boxes are selected (checked). Click OK.

NOTE: If the check boxes are shaded, verify that you opened or created a Web. In Folder view, the first item in the Folder List pane should show a URL (http://...), not a file path (C:\...).
On the View menu, click Page to edit your newly created Upload.htm page. Switch to Normal view, if necessary, by clicking Normal at the bottom of the FrontPage window.
Setting up the File Upload Form

Click where you want to position the File Upload form. On the Insert menu, point to Form, and then click File Upload.

A form appears on your page, and the cursor is positioned between the Browse and Submit buttons. Press ENTER several times to add some white space between the File Upload control and the Submit button. If you want to allow simultaneous uploads of multiple files, click the form again and then insert additional File Upload controls.

To change the label on the Submit button, right-click the button, and then click Form Field Properties on the menu that appears. In the Value/Label box, type Upload, and then click OK.

Right-click anywhere on the form and then click Form Properties on the menu that appears.

Select the Send To option.

Click Options.

In the Saving Results dialog box, click the File Upload tab.

Click Browse.

In the Current Web dialog box, click the Uploads folder.

Click OK three times to return to the form.

On the File menu, click Save to save your updated page.
Testing the Page

To test your page, click Preview in Browser on the File menu. The Upload.htm page opens in your Web browser.

Click Browse, select a file you want to upload from your hard disk to the Web server, and then click Open.

Click the Upload (or Submit) button.

The file is uploaded to the Uploads folder on the Web server. You should see confirmation that the file uploaded successfully.



The solution provided by RCMB works a treat, but does anyboy know how to open a new browser window which contains a larger image of the one being displayed in the results table when the person browsing the page clicks on the image?

I tried adding an Open Browser Window to it with the path being: -


Where Large_Image is the file name contained in the database next to the file name of the image displayed in the results.  Unfortunatly this results in the following error massage being displayed: -

Microsoft VBScript compilation error '800a03ea'

Syntax error

/stock_code.asp, line 46


Any suggestions?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now