GetByName

Gets the value from the fields array by the column name in this DataRow.

Syntax

ASCII Version
const char* getByName(DataRow* dataRow, const char* name ) 
Unicode Version
const UChar* getByName(DataRow* dataRow, const UChar* name ) 

Parameter

  • Datarow - the DataRow to which this function applies
  • Name with which the specified value is to be associated

Results

Returns the value for the column name in the DataRow, returns empty string if the column name does not exist.

Example

ASCII Version
char* value = getByName ( dataRow, "City") 
Unicode Version
UChar* value; 
UChar columnName[64]; 
char* columnNameStr= "City" 
u_charsToUChars(columnNameStr,	columnName, strlen(columnNameStr)); 
columnName [strlen(columnNameStr)]=0; 
value = getByName ( dataRow, columnName);