GetColumnIndex

Gets the corresponding column index.

Syntax

ASCII Version
int getColumnIndex(DataTable* dataTable ,const char* columnName) 
Unicode Version
int getColumnIndex(DataTable* dataTable ,const UChar* columnName) 

Parameters

  • Datatable - the DataTable to which this function applies
  • Column name

Results

Returns the corresponding column index.

Example

ASCII Version
int nIndex ;
nIndex = getColumnIndex(dataTable ,"AddressLine1") 
Unicode Version
int nIndex ;
UChar columnName[64];
char* columnNameStr= "AddressLine1" u_charsToUChars(columnNameStr, columnName, strlen(columnNameStr));
columnName [strlen(columnNameStr)]=0;
nIndex = getColumnIndex(dataTable , columnName);