...a really basic, dummy kind of question...
in the famous SET RELATION documentation example, the parent
table is CUSTOMERS and the child table is ORDERS.
the documentation does not actually say both tables have a field
called cust_id.
now, if i understand correctly, to set a relation between the
two, you do something like this:
SELECT ORDERS
SET ORDER TO TAG cust_id
SELECT CUSTOMERS
SET RELATION TO cust_id INTO ORDERS
QUESTIONS:
in the "SET RELATION to cust_id INTO ORDERS" command, is the cust_id
referring to ORDERS.cust_id or to CUSTOMERS.cust_id or to the ORDERS
index tag cust_id ?
if (as the documentation says) the child table has to be indexed on
the field that you want to 'relation' on, why do you need to specify
the child field (if that's what field is being referred to in the
SET RELATION command).
assuming that cust_id in the SET RELATION command refers to
ORDERS.cust_id, how does VFP know what field from the parent table
to use in the relation ? does the parent table field HAVE to
have exactly the same name as the child relation field (or index) ?
if the parent field name is "customer_id" and the child field (or index?)
name is "cust_id" ... how would i write the SET RELATION command ?
if for some reason i couldn't rename the field, would i have to
copy the parent table to another (temporary) table and change the
name ?
patrick