MACROMEDIA DREAMWEAVER MX 2004-USING DREAMWEAVER Use Manual page 715

Hide thumbs Also See for DREAMWEAVER MX 2004-USING DREAMWEAVER:
Table of Contents

Advertisement

Running a stored procedure (ASP)
With ASP pages, you must add a command object to a page to run a stored procedure. For more
information on command objects, see
To add a stored procedure to an ASP page:
In Dreamweaver, open the page that will run the stored procedure.
1
In the Bindings panel (Window > Bindings), click the Plus (+) button, and then select
2
Command (Stored Procedure).
The Command dialog box appears.
Enter a name for the command, select a connection to the database containing the stored
3
procedure, and then select Stored Procedure from the Type pop-up menu.
Select your stored procedure by expanding the Stored Procedures branch in the Database Items
4
box, selecting the stored procedure from the list, and clicking the Procedure button.
Enter any required parameters in the Variables table.
5
You don't need to enter any parameters for any
Click OK.
6
After you close the dialog box, Dreamweaver inserts ASP code in your page that, when run on the
server, creates a command object that runs a stored procedure in the database. The stored
procedure in turn performs a database operation, such as inserting a record.
By default, the code sets the Prepared property of the Command object to
application server reuse a single compiled version of the object every time the stored procedure is
run. If you know the command will be executed more than a few times, having a single compiled
version of the object can improve the efficiency of database operations. However, if the command
will only be executed one or two times, using one might actually slow down your web application
because the system has to pause to compile the command. To change the setting, switch to Code
view and change the Prepared property to
Note: Not all database providers support prepared commands. If your database does not support it,
you might get an error message when you run the page. Switch to Code view and change the
Prepared property to false.
If the stored procedure takes parameters, you might create a page that gathers the parameter
values and submits them to the page with the stored procedure. For example, you may create a
page that uses URL parameters or an HTML form to gather parameter values from users.
Running a stored procedure (JSP)
With JSP pages, you must add a Callable server behavior to a page to run a stored procedure.
To add a stored procedure to a JSP page:
In Dreamweaver, open the page that will run the stored procedure.
1
In the Bindings panel (Window > Bindings), click the Plus (+) button and select Callable
2
(Stored Procedure).
The Callable (Stored Procedure) dialog box appears.
Complete the dialog box.
3
For instructions, click the Help button in the dialog box.
Click OK.
4
"ASP command objects" on page
false
Building pages with advanced data manipulation objects (ASP and JSP)
variable.
RETURN_VALUE
.
633.
, which makes the
true
715

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents