Adobe 38040334 - Dreamweaver CS3 User Manual page 551

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

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.
See also
"Define a recordset without writing SQL" on page 547
Writing SQL for ASP.NET
When writing SQL statements in the Advanced DataSet dialog box, there are conditions specific to ASP.NET that
you must be aware of. These conditions are described in the next sections.
Parameters
The syntax you use to reference parameters varies depending on the database connection in use (for example, OLE
DB or Microsoft SQL Server).
OLE DB
When connecting to a database using OLE DB, parameters must be referenced using a question mark (?). For
example:
SELECT * FROM Employees WHERE HireDate > ?
Microsoft SQL Server
When connecting to Microsoft SQL Server using the Managed Data Provider for SQL Server supplied with the .NET
Framework, all parameters must be named. For example:
SELECT * FROM Employees WHERE HireDate > @hireDate
Insert code within SQL statements
When inserting code within SQL statements written for ASP.NET, you must enclose all strings in quotes (" "), and
enclose the code in parentheses ( ).
SELECT * FROM Employees WHERE HireDate > "+ (Request.queryString("hireDate"))
See also
"Database connections for ASP.NET developers" on page 518
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
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
method, the data submitted by the form is passed to the server. Before you begin, make sure
POST
you pass a form parameter to the server.
method to submit data. The information is appended to the URL of the requested
September 4, 2007
DREAMWEAVER CS3
544
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents