Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

PARENTS( [ _tables ] )

Purpose

Determine the number tables into which the current table has a parent
relation, as determined by DICT-Rltype for that relation = "P", and
fill an array with the names of those tables.

A parent, "P" relation is a lookup relation into a table which contains the
primary key. It may be one-to-one or many-to-one.

In a multi-user environment, the parent record must be locked during an
update transaction, to prevent concurrent changes "under" the current
user's update. GET_STD2() calls PARENTS() to do this automatically.

Arguments

     _tables -- if passed, array to fill with parent table names

Setup

Relations and index keys must be filled in appropriately in the dictionary
records for the current table and all "P"-related tables.

Example

     LOCAL x := PARENTS()      && get no. of parents
     PRIVATE tables[ x ]       && declare array
     PARENTS( tables )         && fill it

Returns

Number of parents tables.

Side Effects

Fills array if passed.

Artful Calls

DICTFIND

Source File

AA_RELAT.PRG

See Also: CHILDREN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson