How to Determine What Relations Exist in a .DBCLast reviewed: April 30, 1996Article ID: Q129640 |
The information in this article applies to:
SUMMARYThe ADBOBJECT() function will create an array containing a a list of all persistent relations defined in a database container (.DBC file). This information can be useful outside of the database container. For example, it can be useful when you want to set relationships automatically for use within a one-to-many report.
MORE INFORMATIONThe ADBOBJECT() function requires two parameters:
OPEN DATABASE \vfp\samples\mainsamp\data\tastrade =ADBOBJECT(laRelations, "RELATION") DISPLAY MEMORYThe array contains five columns. Each relationship defined in the DBC will occupy one row in the array. The columns contain the following information:
Column Contents -------------------------------------------------------------- 1 Name of the parent table 2 Name of the child table 3 Name of the parent index tag involved in the relation 4 Name of the child index tag involved in the relation 5 Information for the Relational Integrity BuilderColumn 5 contains up to three letters, indicating Update, Delete, and Insert triggers respectively. Each letter code within the column will contain a "C" for Cascade, an "R" for Restrict, or an "I" for Ignore. For example, a value of "CRR" in column 5 would indicate that updates should be cascaded, deletes should be restricted, and inserts should be restricted.
REFERENCESThe GENDBC utility uses this technique to define relationships as well as obtain other information from the DBC. If you would like to view the source code for this utility, it is stored as VFP\TOOLS\GENDBC\GENDBC.PRG.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |