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.

There are three types of parameters:

The type of parameters that you map depend on the type of procedure you are creating. The Tables dialog box and the Procedure Editor provide different options, depending on the type of procedure you are creating.

 

Special Mapping Options

When using recordsets in a procedure, you may want to further refine which records are returned. Or, you may find that the 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. Here's how to solve these two 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.

Use the Recordset tab in Procedure Editor to further refine how Host Integrator retrieves data from recordsets.

These instructions assume that you have already inserted the recordset. If you have not done so, follow the instructions on 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.