SET AUTOJOIN
Class
Indexing
Purpose
Enable automatic creation of indexes to satisfy relationships
Syntax
SET AUTOJOIN ON | OFF | (<expL>)
See Also
INDEX, REINDEX, SET RELATION, SET VIEW
Description
If SET AUTOJOIN is ON, then an index file is automatically generated to satisfy the relationship between two tables when a SET RELATION TO command is executed.
When the SET RELATION TO command is executed, a check is made to see if the target table which is being related has an index associated with it. If not, a temporary index is generated on a field in the target table which has the same name, data type and width as that which is specified in the SET RELATION command. The index is a single index file with a ’.tmp’ extension. If no matching field exists, an error is given.
This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, AUTOJOIN is set ON. If a value of .F. is returned, AUTOJOIN is set OFF. Note that <expL> should be enclosed in round brackets. You should create the required index files to satisfy any permanent relationships, so that they are not created each time the relationship is specified. The use of AUTOJOIN should be limited to temporary views across tables only.
By default, AUTOJOIN is OFF.
Example
select a use addresses select b use patrons set autojoin on set relation to name into addresses
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer