SetChildren

与えられた指定の親子関係の行を設定します。 この名前で行がすでに存在する場合は、呼び出し元に返されます。

構文

ASCII バージョン
DataRow** setChildren(DataRow* dataRow, const char* childName, DataRow** dataRows) 
Unicode バージョン
DataRow** setChildren(DataRow* dataRow, const UChar* childName, DataRow** dataRows) 

結果

指定された親/子関係の名前セットを返します。

ASCII バージョン
DataRow* dataRow = createDataRow(); 
DataRow* child1DataRow1 = createDataRow();	 
DataRow* child1DataRow2 = createDataRow(); 
DataRow* child2DataRow = createDataRow(); 
DataRow** child2Rows; 
DataRow** returnRows; 

setByName(child1DataRow1, "Address", "200 Congress"); 
setByName(child1DataRow1, "City", "Austin"); 
 
setByName(child1DataRow2, "Address", "100 Congress"); 
setByName(child1DataRow2, "City", "Dallas"); 
 
setByName(child2DataRow, "Address", "100 Congress"); 
setByName(child2DataRow, "City", "Austin"); 
 
addChild( dataRow, "child1", child1DataRow1); 
addChild( dataRow, "child1", child1DataRow2); 
addChild( dataRow, "child2", child2DataRow ); 

child2Rows=getChildren(dataRow, "child2"); 

returnRows=setChildren( dataRow, "child1", child2Rows);
Unicode バージョン
DataRow* dataRow = createDataRow();
DataRow* child1DataRow1 = createDataRow();
DataRow* child1DataRow2 = createDataRow();
DataRow* child2DataRow	= createDataRow();
DataRow** child2Rows;
DataRow** returnRows;
UChar	name[128];
UChar	columnValue[128];
UChar	childName[128];

setByName(child1DataRow1, convertcharToUChar("Address", name), convertcharToUChar("200 Congress", columnValue));
setByName(child1DataRow1, convertcharToUChar("City", name), convertcharToUChar("Austin", columnValue));
setByName(child1DataRow2, convertcharToUChar("Address", name), convertcharToUChar("100 Congress", columnValue));
setByName(child1DataRow2, convertcharToUChar("City", name) convertcharToUChar("Dallas", columnValue) );
setByName(child2DataRow, convertcharToUChar("Address", name), convertcharToUChar("100 Congress", columnValue) );
setByName(child2DataRow, convertcharToUChar("City", name), convertcharToUChar("Austin", columnValue) );

addChild( dataRow, convertcharToUChar("child1", childName), child1DataRow1);
addChild( dataRow, convertcharToUChar("child1", childName),child1DataRow2);
addChild( dataRow, convertcharToUChar("child2", childName), child2DataRow );

child2Rows=getChildren(dataRow, convertcharToUChar("child2",childName)); 
returnRows=setChildren( dataRow, convertcharToUChar("child1",childName), child2Rows);