Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-04-07
7
Medium Priority
?
508 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 1000 total points
ID: 10775989
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
ID: 10798752
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
ID: 10799034
I tried the OLE method and it will not display the picture.

RCMB
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 2

Expert Comment

by:JakeBushnell
ID: 10799069
Cool, sorry about that :(
Jake
0
 

Author Comment

by:Jeeva
ID: 10936426
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
ID: 10937368
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
ID: 14770281
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
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…
Suggested Courses

885 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