SetByIndex
Sets the value for the corresponding column for the DataRow. If the value for the name exists, the old value is replaced.
Syntax
int setByIndex(DataRow* dataRow, int index, const char* value)
int setByIndex(DataRow* dataRow, int index, const UChar* value)
Parameters
- Datarow - the DataRow to which this function applies
- Column index with which the specified value is to be associated
- Value to be associated with the specified name
Exceptions
- The column index is invalid
Results
Returns 0 if successful or error code.
Example
int nRet;
nRet= setByIndex (dataRow, 1, "Austin");
if(nRet != SUCCESSFUL_RETURN)
{
printf(getErrorMessage(nRet));
//more code
}
int nRet;
UChar* error;
UChar columnValue[64];
char* columnValueStr= "Austin";
u_charsToUChars(columnValueStr, columnValue, strlen(columnValueStr));
columnValue [strlen(columnValueStr)]=0;
nRet= setByIndex (dataRow, 1, columnValue);
if(nRet != SUCCESSFUL_RETURN)
{
error = getErrorMessage(nRet);
//more code
}