Subject Re: Referential Integrity
Author Adam
> I think I know the answer to this one but I'll ask anyway. Is there a
> way to turn off referential integrity within a transaction so that you
> can make sweeping changes that may temporarily voilate referential
> integrity?
>

Hi Steve,

Not within the context of a transaction, you can disable the
referential integrity entirely if you are the only transaction, but
then again don't come complaining when GBAK wont restore your database
because it can't recreate an index or something.

Referential integrity was never really one of the strong points in
Paradox. If I understand your problem correctly, you have a table that
internally references itself.

Something like:

TableA
(
ID,
Something,
SomethingElse,
ParentTableAID
)

And ParenttableAID will be valid (in theory) by the time the sync
completes. A better approach to this sort of problem involves splitting
it into two tables.

tableA
(
ID,
Something,
SomethingElse
)

tableAParent
(
tableAID (PK),
ParentTableAID
)

Using this approach, you could first synchroninse tableA, then
synchronise the internal relationships within the table, and you could
provide a view that makes it look like the original table.

Then again, you may be talking about something totally different.

Adam