Operation Manual

606
USING DREAMWEAVER
Building applications visually
Last updated 3/28/2012
For more information on the type and size of SQL variables, see www.adobe.com/go/4e6b330a.
6 Close the dialog box.
Dreamweaver inserts ASP code in your page that, when run on the server, creates a command that inserts, updates, or
deletes records in the database.
By default, the code sets the Prepared property of the Command object to true, which makes the application server
reuse a single compiled version of the object every time the command is run. To change this setting, switch to Code
view and change the Prepared property to
false.
7 Create a page with an HTML form so users can enter record data. In the HTML form, include three text fields
(txtCity, txtAddress, and txtPhone) and a submit button. The form uses the
GET method and submits the text field
values to the page that contains your command.
About stored procedures
Although you can use server behaviors to build pages that modify databases, you can also use database manipulation
objects such as stored procedures or ASP command objects to build the pages.
A stored procedure is a reusable database item that performs some operation on the database. A stored procedure
contains SQL code that can, among other things, insert, update, or delete records. Stored procedures can also alter the
structure of the database itself. For example, you can use a stored procedure to add a table column or even delete a
table.
A stored procedure can also call another stored procedure, as well as accept input parameters and return multiple
values to the calling procedure in the form of output parameters.
A stored procedure is reusable in the sense that you can reuse a single compiled version of the procedure to execute a
database operation a number of times. If you know a database task will be executed more than a few times—or the same
task will be executed by different applications—using a stored procedure to execute that task can make database
operations more efficient.
Note: MySQL and Microsoft Access databases do not support stored procedures.
Add a stored procedure (ColdFusion)
You can use a stored procedure to modify a database. A stored procedure is a reusable database item that performs
some operation on the database.
Before you use a stored procedure to modify a database, make sure the stored procedure contains SQL that modifies
the database in some way. To create and store one in your database, consult your database documentation and a good
Transact-SQL manual.
1 In Dreamweaver, open the page that will run the stored procedure.
2 In the Bindings panel (Window > Bindings), click the Plus (+) button, and then select Stored Procedure.
3 In the Data Source pop-up menu, select a connection to the database containing the stored procedure.
All other types of text fields, including the MySQL text data types char,
varchar and longtext
LongVarChar check database table
Text (MS Access) or nvarchar, nchar (MS SQL Server) VarWChar check database table
Memo (MS Access), ntext (MS SQL Server), or fields that support large
amounts of text
LongVarWChar 1073741823
Type in database Type in Dreamweaver Size