CRDataset::isBOF
Previous  Index  Next

virtual bool isBOF() const;

Return Value

True if the dataset contains no records or if you have scrolled backward before the first record, otherwise false.

Description

Call this member function before you scroll from record to record to learn if the current record pointer is positioned to the first record of the dataset. You can also use isBOF with isEOF to determine whether the dataset contains any records or is empty.

Example

  dataset.open();
  if (dataset.isBOF())
    return; // dataset is empty

  // scroll to last record
  dataset.last();

  // scroll to first record
  while (!dataset.isBOF()
    dataset.prev();
   
See Also

CRDataset::isEOF, CRDataset::first, CRDataset::prev


CRDataset | Classes | OCL | Index