Using the Tables Dialog Box

Tables and procedures enable you to create a database abstraction of host data. Use the Tables dialog box to create tables and procedures for a Host Integrator Model.

The Tables dialog box is divided into these areas, depending on whether you are creating a table, procedure, or compound procedure:


Tables and Procedures Pane

The Tables and procedure pane is a tree-view of the model's tables and their associated procedures. Click a table or procedure to display context-sensitive information in the properties pane on the right-side of the dialog box.

Action Buttons

 

Table Properties Pane

When a table is selected in the Tables and procedures pane, you can view and configure the following properties:

Name
Specifies the name of the currently selected table.

Description
Displays a description of the currently selected table.

Columns
Click the "plus sign" button on the right to add a new table column or the "minus sign" button to delete the selected column. Then supply a Name, Data Type, Key value, and Description for each column. Table columns defined in the Tables dialog box are initially not associated with specific procedures. For step-by-step instructions on creating table columns, see Defining Table Columns.

Column Properties
Set minimum and maximum values for a column; this is an optional setting.

Allow SQL SELECT statements to return a subset of columns when all columns are requested
Select this option to have Host Integrator return a partial set of data to a querying application. If you leave this check box clear, Host Integrator will return an error to a querying application if it cannot return a full set of data.

 

 

Procedure Properties

When a procedure is selected in the Tables and procedures pane, you can view and set these properties:

Name
The name of the procedure.


Home entity
The entity where the procedure begins. If the Navigate back to starting point upon completion option is selected, the procedure will also navigate back to this entity upon completion. Note: Models also define a home entity, but this does not affect a procedure's home entity.


Type
Specifies the procedure's type. Choose to create one of these types of procedures:
Parameters
Set these parameters for the type of procedure you are creating.


Available for SQL queries
If this option is selected, the procedure is available for Host Integrator to fulfill SQL queries. If this option is not selected, the procedure is only available using the PerformTableProcedure method.

Navigate back to starting point upon completion
If this option is selected, the procedure returns to its home entity upon completion. This gives you greater flexibility in creating sequences of procedures, but also increases the difficulty of assuring that Host Integrator is able to navigate from where one procedure ends off to where another begins.

Action Buttons

 

Compound Procedure Properties

A compound procedure is a procedure that consists of one or more SELECT subprocedures and an UPDATE or a DELETE subprocedure. A compound procedure cannot contain an INSERT procedure. By combining one or more subprocedure into a compound procedure, you can perform more than one query level task at the same time, like selecting several records and updating or deleting them. The order in which subprocedures appear in a compound procedure is the order in which they are invoked. The first subprocedure in a compound procedure must be a SELECT subprocedure.

When you select a compound procedure in the Tables and procedures pane, you can view and set these properties:

Name

The name of the compound procedure.


Description

The compound procedure's description.


Type

Specifies the compound procedure's type. The options are SELECT, UPDATE, and DELETE.


Subprocedures

This lists the compound procedure's subprocedures. The SELECT subprocedures are listed in the Select subprocedures box, and the UPDATE or DELETE subprocedure, if any, is listed in the Update/Delete procedure box. The order the subprocedures are listed is the order they are invoked when the compound procedure is run.

The first subprocedure in a compound procedure must be a SELECT subprocedure. Any output parameters from a subprocedure are used as the filter or data parameters for the next listed subprocedure .

 

Filter parameters

The Filter parameters list specifies which attributes are valid in incoming query requests. Only those attributes that are selected (checked) are valid. If the Req box is checked, all queries MUST contain this attribute or the Host Integrator will return an error.

Additional parameters
The column on the right differs according to the procedure type:


Available for SQL queries

When you select this check box, you make this procedure available for the Host Integrator to use to fulfill SQL queries. If you clear this check box, this procedure will only be available using the PerformTableProcedure method.

 

 

 

  Attachmate