FILEFLEX API REFERENCE



NAME
DBAddExactRelation -- Create a subordinate, one-to-one relation

SYNTAX
DBAddExactRelation(parent-relation, child-tag)

CATEGORY
Relations

DESCRIPTION
NEW IN FILEFLEX 3.0

This function creates a subordinate relation to the current relation. DBAddExactRelation adds the current database and the current index tag to the current relation. This creates a new child relation.

First, select the database to be a child with DBSelect. Then select the parent with DBSelectRelation. Finally, call DBAddExactRelation with the first parameter being an expression that describes the relation in the parent database (e.g., the name of the linked field).

The second parameter is the child's tag to be related to the parent.

If the relation was successful, it will return 0 and go to the top of the virtual, combined file. If there were no records found in the virtual, combined file, a value of 3 is returned. Otherwise, an error value is returned. This function permits one-to-one and many-to-one relations, but only one exact match is available per item.


EXAMPLE
put DBAddExactRelation(mainRelation,"BYTITLE") into DBResult

SEE ALSO
DBSetParentRelation, DBCloseRelation, DBSelect, DBSelectRelation, DBAddManyRelation, DBRelationalQuery

INTERNAL FUNCTION NUMBER
93


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender