Operation Manual
530
USING DREAMWEAVER
Making pages dynamic
Last updated 3/28/2012
Dynamic websites require a data source from which to retrieve and display dynamic content. Dreamweaver lets you
use databases, request variables, URL variables, server variables, form variables, stored procedures, and other sources
of dynamic content. Depending on the data source, you can either retrieve new content to satisfy a request, or modify
the page to meet the needs of users.
Any content source that you define in Dreamweaver is added to the list of content sources in the Bindings panel. Then
you can insert the content source into the currently selected page.
About recordsets
Web pages can’t directly access the data stored in a database. Instead, they interact with a recordset. A recordset is a
subset of the information (records), extracted from the database using a database query. A query is a search statement
designed to find and extract specific information from a database.
When using a database as a content source for a dynamic web page, you must first create a recordset in which to store
the retrieved data. Recordsets serve as an intermediary between the database storing the content and the application
server generating the page. Recordsets are temporarily stored in the application server’s memory for faster data
retrieval. The server discards the recordset when it is no longer needed.
A query can produce a recordset that includes only certain columns, only certain records, or a combination of both. A
recordset can also include all the records and columns of a database table. However, because applications rarely need
to use every piece of data in a database, you should strive to make your recordsets as small as possible. Because the web
server temporarily holds the recordset in memory, using a smaller recordset uses less memory, and can potentially
improve server performance.
Database queries are written in Structured Query Language (SQL, pronounced “sequel”), a simple language that allows
you to retrieve, add, and delete data to and from a database. The SQL builder included with Dreamweaver lets you
create simple queries without having to understand SQL. However, if you want to create complex SQL queries, a basic
knowledge of this language lets you create more advanced queries, and provides you with greater flexibility in
designing dynamic pages.
Before you define a recordset for use with Dreamweaver, you must create a connection to a database and—if no data
exists yet—enter data into the database. If you have not yet defined a database connection for your site, refer to the
database connection chapter for the server technology you are developing for, and follow the instructions on creating
a database connection.
More Help topics
“Define a recordset without writing SQL” on page 536
About URL and form parameters
URL parameters store retrieved information input by users. To define a URL parameter you create a form or hypertext
link that uses the
GET method to submit data. The information is appended to the URL of the requested page and
communicated to the server. When using URL variables, the query string contains one or more name-value pairs that
are associated with the form fields. These name-value pairs are appended to the URL.
Form parameters store retrieved information that is included in the HTTP request for a web page. If you create a form
that uses the
POST method, the data submitted by the form is passed to the server. Before you begin, make sure you
pass a form parameter to the server.