Show TOC

Attaching a Stored Procedure to a TableLocate this document in the navigation structure

You can attach a stored procedure to a table when your current DBMS supports stored procedures. This feature lets you update the table or retrieve information from this table.

Context

For example, the stored procedure TABLE_ADDROW can be attached to a table in which you need to insert rows.

When you generate an OOM from a PDM, the procedures attached to a table become operations with the <<procedure>> stereotype in the generated class. By attaching procedures to tables, you are able to define class operations in the generated OOM.

When you generate a PDM from an OOM, class operations with the <<procedure>> stereotype become stored procedures attached to the generated table. The operation body is generated as a comment in the procedure definition.

You can attach a table to a procedure from the property sheet of a procedure or the property sheet of a table.

Procedure

  1. Open the table property sheet and click the Procedures tab.
  2. Click the Add Objects tool to open a selection box, choose the the stored procedure you want to attach to the table and click OK.

    The stored procedure is displayed in the list of stored procedures.



  3. Click OK.