Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Integridad Referencial
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00455308
Message ID:
00456891
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform