O'Reilly logo

Dreamweaver MX: The Missing Manual by David Sawyer McFarland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating Database Records

Maybe someone made an error while entering data into the database. Maybe the price of your product changes. Or maybe you want to provide a way for your Web visitors to update their email addresses. In any case, the time will come when you want to edit a record in a database.

Creating Update Record Forms in Dreamweaver is very similar to creating Insert Record forms. Both require a HTML form that your audience can fill out and submit. The primary difference is that an update form is already filled out with information from the database. It’s like a combination of an Insert Record Form and a record detail page (such as the one created by the Master Detail Page set described on page 663).

The first step in creating an update form is to add a recordset to the update page (see page 636). The recordset will retrieve the data that appears in each field of the update form.

The recordset should contain only a single record—the one to be updated. Therefore, you must use a form or URL parameter to filter the recordset (see page 639 for more on filtering). For example, on a page listing company employees, you could add an Edit button that would link to the page containing the update form. If you added a Go To Detail Page server behavior (see page 667) to the employee listing page, you could then pass the ID for a specific employee to the update page. In turn, the update page would use that ID to filter the database for a single record and display the employee information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required