Microsoft KB Archive/263510

= HOW TO: Display a Confirmation Page When You Save Records to a Database in FrontPage 2000 =

Article ID: 263510

Article Last Modified on 11/25/2002

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q263510



IN THIS TASK
SUMMARY Display Confirmation Page When Saving Records to the Database
 * Step 1: Create the Form
 * Step 2: Create the Form Handler
 * Step 3: Add the &quot;Confirmation&quot; Fields to the Page
 * Step 4: Format the Confirmation Page



SUMMARY
This article explains how to display a confirmation page when you save records from a form to a database.

NOTE: This procedure is not necessary if you install the following updates from Microsoft:


 * Microsoft Office 2000 SR-1/SR-1a
 * Microsoft FrontPage Server Extensions SR1.1

To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).

To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base:

245025 OFF2000: How to Obtain and Install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)

To obtain the Microsoft FrontPage Server Extensions SR1.1, click the following link, and then click the link for the operating system platform that you need:

Microsoft FrontPage 2000 Server Extensions

back to the top

Display Confirmation Page When Saving Records to the Database
This article uses a Custom SQL statement to insert records into the database. This article assumes a working knowledge of SQL, HTML forms, and the FrontPage Database Results Wizard.

WARNING: Your use or modification of the SQL statement provided in this article is at your own risk. Microsoft provides this SQL statement &quot;as is&quot; without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Microsoft does not support modifications of the SQL statement to suit specific customer requirements.

The following steps describe how to add a new shipper to the Northwind Sample database and display a confirmation page for the shipper that you just added.

back to the top

Step 1: Create the Form

 * 1) Create a form with two one-line text boxes.
 * 2) Right-click the first one-line text box, and then click Form Field Properties.
 * 3) Type CompanyName as the name of the first field.
 * 4) Right-click the second one-line text box, and then click Form Field Properties.
 * 5) Type Phone as the name of the second field.
 * 6) Right-click the form, and then click Form Properties.
 * 7) Click Send to Other, and then click Options.
 * 8) In the Action field, type add.asp and then click OK.
 * 9) Click OK again.
 * 10) On the File menu, click Save As.
 * 11) Save the page as &quot;Add_Shipper.htm&quot;.

back to the top

Step 2: Create the Form Handler

 * 1) On the File menu, click New Page.
 * 2) Click Normal Page, and then click OK.
 * 3) On the Insert menu, click Database, and then click Results.
 * 4) In step 1 of 5, click Use a sample database connection (Northwind).
 * 5) In step 2 of 5, click Custom Query, and then click Edit.
 * 6) In the customer query box, type the following:

INSERT INTO Shippers (CompanyName, Phone) VALUES ('::CompanyName::', '::Phone::')
 * 1) In step 3 of 5, click More Options.
 * 2) Delete the text under Message to display if no records are returned.
 * 3) In step 4 of 5, clear all three check boxes under the table, and then click Next.
 * 4) In step 5 of 5, click Display all records together, clear the Add Search Form check box, and then click Finish.

back to the top

Step 3: Add the &quot;Confirmation&quot; Fields to the Page

 * 1) Position the insertion point under the Database Results that you created earlier.
 * 2) On the Insert menu, click Database and then click Results.
 * 3) In step 1 of 5, click Use Existing Database Connection and accept the default of &quot;Sample&quot;.
 * 4) In step 2 of 5, click Shippers under Record Source.
 * 5) In step 3 of 5, click More Options.
 * 6) Click Criteria and then click Add.
 * 7) Under Field Name, click Company Name, and then click OK.
 * 8) Click OK twice, and then click Next.
 * 9) In step 4 of 5, click List - one field per item in the drop-down list, clear the two check boxes, and then click Next.
 * 10) In step 5 of 5, click Display all records together, clear the Add Search Form check box, and then click Finish.

back to the top

Step 4: Format the Confirmation Page
In Step 3 earlier in this article, you added three fields to the page outlined by the yellow boxes that represent the Database Results Wizard. You can use these fields to create the confirmation page. As an example, follow these steps:


 * 1) Type the following above the fields:

You have added the following shipper information:
 * 1) On the File menu, click Save As.
 * 2) Save the page as &quot;Add.asp&quot;.
 * 3) Preview the Add_Shipper.htm page in your browser.
 * 4) Type the information in the form, and then click Submit.

The information that you added to the database is added, and the confirmation page is displayed.

NOTE: If you click Database and then click Column on the Insert menu, you can add the database columns to your own custom text. Be sure to keep your text between the yellow database region boxes.

back to the top

Additional query words: front page confirmation database fp2000 fp2k

Keywords: kbhowto kbhowtomaster KB263510

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.