Home > Products > UltraDev > Support > Editing Database Records
Dreamweaver UltraDev Icon Macromedia Dreamweaver UltraDev Support Center - Editing Database Records
Creating a command object that runs a stored procedure

You can use UltraDev to create a command object that calls a stored procedure in your database.

Note: Microsoft Access databases do not support stored procedures.

To create a command object that lets you support stored procedures:

1 Open the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and choose Command.
The Command dialog box appears.
2 Enter a name for the command, choose a connection to the database containing the stored procedure, and choose Stored Procedure from the Type pop-up menu.
3 If the stored procedure returns a recordset, select Return Recordset and enter a name for the recordset.
4 Specify your stored procedure by expanding the Stored Procedures branch in the Database Items box at the bottom of the dialog box, selecting your stored procedure, and clicking the Procedure button
UltraDev automatically fills in the SQL and Variables boxes, as follows:
5 Click OK to create the command.
After you close the dialog box, UltraDev inserts ASP code in your page that, when run on the server, creates a command object that runs a stored procedure 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 stored procedure is run. To change this setting, switch to Code view and change the Prepared property to False.

To Table of Contents Back to Previous document Forward to next document