Using stored procedures to modify databases (ASP.NET)

Using stored procedures to modify databases (ASP.NET)

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.

To add a stored procedure to an ASP.NET page:

  1. In Dreamweaver, open the page that will run the stored procedure.
  2. In the Bindings panel (Window > Bindings), click the Plus (+) button and select Stored Procedure.

    The Stored Procedure dialog box appears.

    This is a picture of the feature being described.

  3. Complete the dialog box.

    For more information, see Setting the Stored Procedure dialog box options (ASP.NET).

  4. Click OK.

After you close the dialog box, Dreamweaver inserts ASP.NET code in your page that, when run on the server, executes a stored procedure in the database. The stored procedure in turn performs a database operation, such as inserting a record or executing a query.

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.

Related topics

  • Stored procedures

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly