AddChild

Adds a new DataRow to the named parent/child relationship. If the named relationship exists, the supplied DataRow will be appended to the existing DataRow collection. Otherwise, a new collection will be created with the supplied DataRow as its only element.

Syntax

ASCII Version
void addChild(DataRow* dataRow, const char* childName, DataRow* childDataRow) 
Unicode Version
void addChild(DataRow* dataRow, const UChar* childName, DataRow* childDataRow) 

Parameters

  • The name of the parent/child relationship (e.g., "Flood Plain Data," "References," "Used By," and so forth)
  • The DataRow to be added to the relationship

Example

ASCII Version
DataRow* dataRow = createDataRow();			
DataRow* child1DataRow1 = createDataRow();	 

setByName(child1DataRow1, "City", "Austin"); 
setByName(child1DataRow1, "State", "Texas"); 
 
addChild( dataRow, "child1", child1DataRow1);
Unicode Version
UChar* convertcharToUChar(	char* name, UChar* value) 
 { 
 int lenName= strlen(name); 
 
 u_charsToUChars(name,	value, lenName ); 
 
 value[ lenName]=0; 
 return value; 
 } >
DataRow* dataRow = createDataRow();			
DataRow* child1DataRow1 = createDataRow();	 
UChar				 name[128]; 
UChar				 columnValue[128]; 
setByName(child1DataRow1, convertcharToUChar("City", name), 
	 convertcharToUChar("Austin", columnValue)); 
setByName(child1DataRow1, convertcharToUChar("State", name), 
	 convertcharToUChar("Texas", columnValue));
addChild( dataRow, "child1", child1DataRow1);