Mapping Procedure Parameters

Parameter mapping is the key component of a procedure's definition. Parameter mapping links the attributes or fields in your host application model with parameters in your procedure, which are then used by the procedure to select, update, insert, or delete host data.

The type of parameter you choose to map is dependent on the type of procedure you are creating. The Tables dialog box and Procedure Editor provide different options.

There are three types of parameters:

Parameter Description
Filter parameter Identify the records you want to select, update, or delete.
Output parameter Contain data that is to be returned from the select procedure.
Data parameter Fields or attributes to update or insert.

This Procedure Requires...
Select A filter parameter to identify the records to select and output parameters that return the requested data
Update A filter parameter to identify the records to update and data parameters that identify the attributes and/or fields to be updated.
Insert Data parameters that identify the attributes and/or fields that are inserted.
Delete A filter parameter to identify the records to delete.


Special Mapping Options

There are two circumstances where you may want to use special mapping options:

To solve these situations:

Refine Which Records are Returned from a Recordset

Comparing parameters to recordset fields enables you to perform finely detailed filtering of data that a procedure retrieves from a recordset. This makes it possible to create complex procedure logic capable of sophisticated data manipulation. Only the records that satisfy all comparison mappings are retrieved.

These instructions assume that you have already inserted the recordset. If you have not done so, follow the instructions for inserting a recordset into a procedure.

To compare a filter parameter to a recordset field for a SELECT procedure:

  1. Click the needed procedure in the Tables and procedures box in the Tables dialog box.
  2. Click Procedure Editor to open the Procedure Editor.
  3. Click the recordset containing the fields you want to compare to filter parameters.
  4. Click the Recordset tab; on the Records tab, select Fetch/Update records as the Action to perform.
  5. In the Records section, specify which matching records to retrieve from the recordset:
  6. In the Record filter section, click the Compare field to parameter column next to each recordset field that you want to use to filter the data that will be retrieved when this procedure runs; select a filter parameter from the list.

When the procedure runs, the parameter is compared to the data retrieved from the recordset; only the data matching all the compare filters is returned to the querying application.

Return Filter Parameters as Output Parameters

In some cases, a filter parameter you use to retrieve host data is not itself available as an attribute or recordset field that can be returned to a querying application. To solve this problem, you can map a filter parameter to an output parameter.

To map a filter parameter to an output parameter:

  1. In the Tables dialog box, click the needed procedure in the Tables and procedures box.
  2. Click the Advanced button beneath the list of output parameters to open the Parameter to Parameter Mapping dialog box. The output parameters for the current procedure are listed in the Output parameter column.
  3. Click the Filter parameter column next to the output parameter you want to map. Then, click the list to select the filter parameter you want to map to the output parameter.
  4. Repeat step 3 for each filter parameter you want to map to an output parameter.


Related Topics
Bullet Inserting entities into a procedure
Bullet Procedures overview
Bullet Creating procedures