CRDataset::operator []
Previous  Index  Next

CRField& operator [](int index) const;
CRField& operator [](const CRString& name) const;

Return Value

The reference to CRField object for the specified field.

Parameters

index
Zero-based index number of the field.  
 
name
The name of the field.  

Description

These operators allow to retrieve a field when its name or its index is known. If the specified field is not found they throw the exception.

Example

  CRString address;
  // get value of the field with the name address
  address = dataset1["Address"].getString();
  // set string to the field with index 0
  dataset2[0].assign(address);

See Also

CRField, CCRDataSet::field


CRDataset | Classes | OCL | Index