Retrieving the record to update (ASP.NET)

Retrieving the record to update (ASP.NET)

After the search page passes a URL parameter to the update page (see Opening the update page and passing the record ID (ASP.NET)), the update page must read the parameter, retrieve the record from the database table, and store it temporarily in a DataSet.

To retrieve the record to update:

  1. Create a new ASP.NET page in Dreamweaver and save it.

    The page will become your update page.

  2. In the Bindings panel (Window > Bindings), click the Plus (+) button and select DataSet (Query).

    If the advanced dialog box appears, click the Simple button to open the simple dialog box.

  3. Name the DataSet, and then select a connection and database table containing the data you want users to update.
  4. Click the Selected option and select a key column (usually the record ID column) and the columns containing the data to be updated.
  5. Configure the Filter area so that the value of your key column equals the value of the corresponding URL parameter passed by the search page.

    This kind of filter creates a DataSet that contains only one record--the record with an ID that matches the value of the URL parameter. For example, if your key column contains record ID information and is called CODE, and if the search page passes the corresponding record ID information in the URL parameter called recordID, here’s how your Filter area should look:

    This is a picture of the feature being described.

  6. Click OK.

When the user selects a record on the search page, the update page generates a DataSet containing only the selected record.

After modifying the update page to retrieve a record from the database and store it in a DataSet, you must add a form to let users modify the record data. You must also add the logic needed to update the database. You can accomplish these tasks in one operation or block by block. See Completing the update page in one operation (ASP.NET) or Completing the update page block by block (ASP.NET).

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly