getAttrName()

Retrieves the name of an attribute that you specify by its position in the business object's attribute list.

Syntax

char * getAttrName(int pos);
  

Parameters

pos [in]
is an integer that specifies the ordinal position of the attribute in the business object's attribute list.

Return values

The name of the specified attribute. The method will return NULL if an invalid position is specified.

Examples

strcpy(attr_name, pObj.getAttrName(1));
   
  for (int i = 0; i<pObj.getAttrCount(); i++) {
     name = pObj.getAttrName(i);
     value = pObj.getAttrValue(i);
     cout << "name: " << name << "value " << value;
  }
  

Copyright IBM Corp. 1997, 2003