Where can I find the documentation that decodes values for the grbit field in the MSysRelationships table? I need to programmatically read the MSysRelations table and determine what kind of relation exists.

The clues I have deduced so far are:

By observation the grbit seems to be the sum of attributes of 2^n, as evidenced by LEFT outer joins having a grbit at or just above 16777216 (=2^24) and RIGHT outer joins having a grbit at or just above 33554432 (=2^25).

The grbit seems to be 256 for both "Enforce Referential Integrity (RI), Cascade Delete but not Cascade Update" as well as for "Enforce RI, Cascade Update but not Cascade Delete". I would have expected that those two scenarios should have had different grbits. (Memo: the grbit is 0 for "enforce RI with no cascading", and 2 for "don't enforce RI")

Also, since the attributes property for the CreateRelation method has only 7 defined constants (dbRelationUnique, dbRelationDontEnforce, dbRelationInherited, dbRelationUpdateCascade, dbRelationDeleteCascade, dbRelationLeft, and dbRelationRight), which is considerably less than the 25 attributes that 2^25 would seem to reply, it's not obvious (at least, not yet to me) how to construct a grbit for, say, a relation with a left outer join, enforced RI, cascade delete, but not cascade update.

Any suggestions or links tro reference material would be appreciated.


Far Farley