Solved

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

Posted on 2004-04-07
7
457 Views
Last Modified: 2013-12-24
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).
0
Comment
Question by:Jeeva
7 Comments
 
LVL 12

Accepted Solution

by:
rcmb earned 250 total points
Comment Utility
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.

RCMB

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.
0
 
LVL 2

Expert Comment

by:JakeBushnell
Comment Utility
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! :)
Jake
0
 
LVL 12

Expert Comment

by:rcmb
Comment Utility
I tried the OLE method and it will not display the picture.

RCMB
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 2

Expert Comment

by:JakeBushnell
Comment Utility
Cool, sorry about that :(
Jake
0
 

Author Comment

by:Jeeva
Comment Utility
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).

Regards

Jeeva
0
 
LVL 12

Expert Comment

by:rcmb
Comment Utility
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.

Procedures:
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.

Link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;288328&Product=fpw

RCMB
0
 

Expert Comment

by:alanblackmadmax
Comment Utility
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: -

<%=FP_FieldLink(fp_rs,"Large_Image")%>

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

Response.Write(FP_FieldLink(fp_rs,\"Large_Image\"))


Any suggestions?

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Spell check for online editor 7 62
LMS Tracking Survey Result 1 43
Build and evolve an interactive experience 1 85
Problem to Popup 37 78
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now