Setting the simple DataSet dialog box options (ASP.NET)

This dialog box defines a DataSet (typically referred to as a recordset in other dynamic document types) as a source of dynamic content without you having to hand code SQL statements.

To set the simple DataSet options for ASP.NET

  1. In the Name text box, enter a name for the DataSet.

    A common practice is to add the prefix ds to DataSet names to distinguish them from other object names in your code. For example: dsPressReleases

    Note that DataSet names can only contain letters, numbers, and the underscore character (_). You cannot use special characters or spaces.

  2. Select a connection from the Connection pop-up menu.

    If no connection appears in the list, click Define to create one.

  3. In the Table pop-up menu, select the database table that will provide data to the DataSet.

    The pop-up menu displays all the tables in the specified database.

  4. To include a subset of the table's columns in the DataSet, click Selected and choose the desired columns by Control-clicking (Windows) or Command-clicking (Macintosh) them in the list.
  5. To include only some of the table's records, complete the Filter section as follows:
  6. If you want the records to be sorted, select a column to sort by, and then specify whether the records should be sorted in ascending order (1, 2, 3... or A, B, C...) or descending order.
  7. You can specify a page to redirect users to if the DataSet query should for some reason fail. For example, if the database were to become unavailable during a query and failed to return the DataSet for the page, you could display an error page with a link to the site's home page.
  8. Click Test to connect to the database and create an instance of the data source.

    A table appears displaying the returned data. Each row contains a record and each column represents a field in that record. Click OK to close the DataSet.

  9. Click OK.

    The newly defined DataSet appears in the Bindings panel.

Related topics