Foreign and primary key do not match
Yes, this is what it says when I try to add or change a field in a Paradox
table.
Yes, I have posted this before, with no results.
The facts:
One Px table, referenced from other tables (with ref. integrity checks) and
referencing other tables (also with ref. int. checks).
I want to add a new field, completely "free" (not in primary key, not
referencing other PK, no constraints).
After preparing a restructure as shown in all examples, dbiDoRestructure
fails with the above message.
OK, after unsucessfully asking for a hint in the previous post, I falled
back to using ALTER TABLE...ADD... in a TQuery. It worked. So far so good.
Now I have to CHANGE the field definition (the whole stuff is part of an
automated upgrade procedure). The dbiDoRestructure fails again with the same
message.
What am I doing wrong / what might be wrong with the table / what happens
there?
Is there a way to _change_ the size/type of a field with BDE SQL over
Paradox? (Opposed to using dbiDoRestructure)
The problem appears only on one specific table. The dbiDoRestructure
procedures work OK on all other tables I tested them. The table looks OK, it
checks well with the repair utility. The restructure works under DBD. The
problem could be replicated on another machine. The only thing that I could
identify as specific to this table compared to the others that work is
having one memo field, but this shouldn't make any difference (or it should?
:))
Please!
Florin.