Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Mark J Fenbers — — source: Usenet: comp.databases.informix
Given a table existing in my database called "AAA", I can determine if a
foreign key exists for "AAA" by looking up the "tabid" in the systables
and finding any "R" constraints on the table by searching in
sysconstraints for that tabid. Then, I can look up the constraint ID in
the sysreferences table to find the ID of the table that is the "target"
of the constraint (table "BBB").
(I can even determine what column(s) in "AAA" are bound to a constraint
by looking up the constraint ID in the sysindexes table.)
But what I cannot seem to figure out is what column(s) in "BBB" are
compared when Informix tests the constraint. Would this be the Primary
Key for "BBB", or not necessarily so? If my software were to output a
message upon encountering error -691, I would want to create a message
that would be explicit about what table has to be updated and which
columns in both "AAA" and "BBB" must match, so that the user knows how
to eliminate this error...
Any ideas?
Mark
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.