Advantage Client Engine
Sets a parent/child relation on the two tables
UNSIGNED32 |
AdsSetRelation (ADSHANDLE hTableParent, ADSHANDLE hIndexChild, UNSIGNED8 *pucExpr); |
hTblParent (I) |
Handle of parent table in relation. |
hIndexChild (I) |
Handle of child index order (not table) in relation. |
pucExpr (I) |
Expression given as a null terminated string to use for the relation. The result of this expression should result in a key that matches a key in hIndexChild. |
AdsSetRelation associates a "child" table to a "parent" through the child’s index. When the user’s application performs a record movement in the parent table (e.g. AdsSkip or AdsSeek), the child’s current record is logically positioned. The Advantage Client Engine performs the actual movement in the child table on demand for efficiency purposes rather than with each parent movement. The child record position is determined by seeking for a key resulting from evaluating the expression (pucExpr) against the parent table’s current record. The expression must be one that can be evaluated by the Advantage Expression Engine. The child is repositioned after the parent moves, but it is valid to navigate anywhere in the child table between movements in the parent. Cyclic relations are not allowed because a cycle would result in an infinite Seek loop.