I've challenged myself to do the following:
I want to perform cascade actions between table contents, in a dynamic way.
E.g.:
If I have record x in table A, and I know that there are records y in table B directly related to record x, it's easy.
I can, for example, do a join to delete the records in both tables.
But now the problem: what if I DON'T know the relationships from table A to all the other tables in the database, but still want to perform a cascade delete?
AFAIK, Progress has no foreign keys, so the relationship between tables is not registered in the database itself. Or is it? I'm now experimenting with the use of the primary unique index, compared to indexes of other tables.
This gives me somewhat of a result, but not exactly the result I want (that is, all the directly related tables to the table on which I want to perform some cascade action).
I know Progress has it's routines for this because you can find the table relationships in the Data Administration (what's the function called again, something like Query/Results?).
Anyone familiar with this problem?
I want to perform cascade actions between table contents, in a dynamic way.
E.g.:
If I have record x in table A, and I know that there are records y in table B directly related to record x, it's easy.
I can, for example, do a join to delete the records in both tables.
But now the problem: what if I DON'T know the relationships from table A to all the other tables in the database, but still want to perform a cascade delete?
AFAIK, Progress has no foreign keys, so the relationship between tables is not registered in the database itself. Or is it? I'm now experimenting with the use of the primary unique index, compared to indexes of other tables.
This gives me somewhat of a result, but not exactly the result I want (that is, all the directly related tables to the table on which I want to perform some cascade action).
I know Progress has it's routines for this because you can find the table relationships in the Data Administration (what's the function called again, something like Query/Results?).
Anyone familiar with this problem?