Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integridad Referencial
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00455308
Message ID:
00456891
Vues:
30
>How can i use Referential Integrity between tables that belong to diferent Databases.
>
>Example:
>Database A contains Table1 and Table2
>Database B contains Table3
>
>There is a common field in Table1 and Table3
>
>How can i use an update, insertion and elimination Cascade Referential Integrity
>between them?
>
>I would apprecite any miracle.

AFAIK,Cascade Referential Integrity is limited to the scope of the DBC.
But, you can update fields in a table in one DBC with data from a field in another table in another DBC by something similar:

REPLACE A!table1.fieldx WITH B!table3.fieldy
IF NOT TABLEUPDATE(F.,.T.,"A!table1")...

but I would use aliases instead.
USE A!table1 IN 0 ALIAS Atable1 ....
and then use Atable1 instead of A!table1.

The integrity checks will remain within each DBC, however.
You can create a free table that can act as a bridge between two fields in tables in the DBCs and write your own tracking code.
Nebraska Dept of Revenue
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform