Set

Sets the value for the corresponding column for the DataRow. If the value for the name exists, the old value is replaced.

Syntax

ASCII Version
void set(const char* columnName, const char* value) 
Unicode Version
void set(const UnicodeString columnName, const UnicodeString value) 

Parameters

  • Name with which the specified value is to be associated
  • Value to be associated with the specified name

Exceptions

  • Blank column name
  • Duplicate column name

Example

ASCII Version
SmartPointer<DataRow> newRow = dataTable->newRow(); 
newRow->set( "AddressLine1" , "10535 Boyer"); 
newRow->set( "City" , "Austin"); 
newRow->set( "State" , "Texas");
Unicode Version

Same as ASCII or:

SmartPointer<DataRow> newRow = dataTable->newRow(); 
UnicodeString address="10535 Boyer"; // Or input unicode string 
newRow->set( "AddressLine1" , address);