• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 5. Dynamic Text and Recordsets > Displaying a Recordset on a Page

Displaying a Recordset on a Page

Occasionally, you just want to dump the contents of a recordset onto a page, perhaps to see what the results look like, or to prepare formatting. There’s no magic button you can press to do this, but Dreamweaver’s features come pretty close.

To display a recordset on a page:

Create a recordset. (If you’re not sure how to do this, review the Bindings Panel section in Chapter 2.)

On the Application tab of the Insert toolbar, click on the Dynamic Table button (Figure 5.1).

Figure 5.1. You can display a recordset with a dynamic table

The Dynamic Table dialog box will appear (Figure 5.2).

Figure 5.2. Specify the source for the table in the Dynamic Table dialog box—it’s full of placeholders.

Select the recordset you just created from the recordset drop-down menu, and click OK.

The table will appear on the page (Figure 5.3). It won’t look like much and won’t yet display any data.

Figure 5.3. In Design view, the table doesn’t look like much.

Preview the page by uploading it to your server (Site > Put) and previewing it in a browser (press F12 or use File > Preview in Browser > [Browser Name]). (If you need to set up server information, see the sections Defining a Local Site... and Additional Remote Server Setup in Chapter 2.)

You’ll see the table on the page, badly formatted, with the data from your database (Figure 5.4). We cover how to improve the formatting in the next section.

Figure 5.4. Previewed in a browser, the table displays the recordset data.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint