Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

Creating a Record Set

To create a record set, perform the following steps

  1. Clear a record handle
  2. Select the default index
  3. Populate the field, or fields, that form the partial index
  4. Call CTRecord.RecordSetOn() to create a record set

// create a new record object

CTRecord ARecord = new CTRecord(ATable);

// clear the record buffer

ARecord.Clear();

// populate the fields

ARecord.SetFieldAsString(0, "DISK");

// create the record set

try

{

ARecord.RecordSetOn(4);

}

catch (CTException err)

{

Console.Write("Record set on failed with error {0}\n", err.GetErrorCode());

}

Once the record set is created, CTRecord.First(), CTRecord.Next(), CTRecord.Last() and CTRecord.Prev() will return only the records that match the record set criteria.

TOCIndex