I have an M-N relationship class with attributes. I am listening to the IRelationshipClassEvents.OnCreate Event event to see if any new relations are created. How can I read these attributes from an IRelationship?

private void m_editEvents_OnCreateRelation(IRelationship rel)
    //how to get the attribute here?
  • Did you try casting to IRow or IRowBuffer and looking at the values? – Kirk Kuykendall Mar 21 '13 at 13:50
  • @KirkKuykendall - you are right..it gets me the attributes..if you can copy the comment to an answer, i will close it as an answer..thanks – vinayan Mar 21 '13 at 14:03

In addition to implementing the IRelationship interface, the attributedrelationship coclass also implements IRow and IRowBuffer. This means that you should be able to cast rel to one of these interfaces and access the attributes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.