Use ASP features in FrontPage
Before you can use the ASP features in FrontPage 2000, install the components listed in the following Microsoft Knowledge Base article:312638 FP: What You Need to Use Active Server Pages (ASP) in FrontPage
To update information in a Microsoft Access database by using FrontPage 2000, you need to create a custom query and enter that into the FrontPage Database Results Wizard.
Create a Web and a database to contain the information
- Start FrontPage 2000. On the File menu, point to New, and then click Web.
- In the Specify the location of the new web box, type the following:
http://localhost/aspsampleUse the One Page Web Wizard.
- Open a new page. Create four one-line text boxes. To do this, follow these steps:
- On the Insert menu, point to Form, and then click One-Line Text Box.
- Use the ARROW keys to position the pointer between the one-line text box and the Submit button.
- Press ENTER twice. Press the DOWN ARROW key to move the pointer below the text box.
- Repeat step a to add three more one-line text boxes.
- Insert the following information for the form fields 1 through 3:
- Double-click the first one-line text box. The Text Box Properties dialog box appears. In the Name box, type FirstName.
- Double-click the second one-line text box, and type LastName in the Name box.
- Double-click the third one-line text box, and type Phone in the Name box.
- Double-click the fourth one-line text box, and type Email in the Name box.
- Type the name of the form field just to the left of each one-line text box. Save the page as ASPsample.asp.
- Right-click the form, and click Form Properties on the menu that appears. In the Form Properties dialog box, click Send to database, and then click Options.
- In the Options for Saving Results to Database dialog box, follow these steps:
- Click Create Database.
- Click OK twice to get back to the page, and then save the page.
Create the Update Page
- Switch to FrontPage and create a new page. (On the File menu, point to New, click Page, and click Normal Page.)
- On the Insert menu, point to Database, and click Results. In Step 1, click Use an existing database connection and select ASPsample. Click Next.
- In Step 2, click Custom query and then click Edit. In the SQL statement window, type the following SQL code:
Click OK and then click Next.
UPDATE results SET Phone='%%Phone%%',Email='%%Email%%' WHERE FirstName='%%FirstName%%' and LastName='%%LastName%%'
- In Step 3, click Next.
- In Step 4, click Next.
- In Step 5, make sure Add Search Form is unavailable (dimmed) or is not selected. Click Finish and then save the page as Update.asp.
Create the Update Form
- Create a new page. On the Insert menu, point to Database, and click Results.
- In Step 1, click Use an existing database connection and select ASPsample. Click Next.
- In Step 2, click Results as the Record Source, and then click Next.
- In Step 3, click Edit and remove all fields except FirstName, LastName, Phone, and Email. Click OK and then click Next.
- In Step 4, select List - one field per item in the Formatting list and Text fields in the List options list, and then click Next.
- In Step 5, select Split records into groups, and type 1 in the Records per group box. Click Finish.
- Double-click Submit and change the Value/Label field to Update.
- Right-click inside the form and then click Form Properties on the menu that appears.
- In the Form Properties dialog box, select Send to other, and then click Options.
- In the Action box, type Update.asp. Click OK twice and save the page as Update_Form.asp.