2

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?
}
2
  • Did you try casting to IRow or IRowBuffer and looking at the values? Mar 21, 2013 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, 2013 at 14:03

1 Answer 1

3

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 and acknowledge you have read our privacy policy.

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