Product Documentation

V9 Update Guide

Previous Topic

Next Topic

New c-treeVCL Features

Working with Resources in c-treeVCL

FairCom DB Resources are a convenient feature allowing extraneous data to be placed into a c-tree data file. Consider application state or version information. With a c-tree resource the application can easily retain information between instances directly in the main data file, without having to create a specialized record requiring exceptional handling. c-treeVCL has been enhanced with support for these c-tree resources. A new class, TCtResource has been created with all of the properties and methods necessary for resource handling. You can find all of the information in the updated c-treeVCL Developer’s Guide.

Renaming Tables

A new method, RenameTable(), has been added to the TCtDatabase class to rename tables. This procedure takes as parameters the old and the new name as strings.

TCtDatabase.RenameTable(FOldName : string; FNewName : string);

The table must be closed and opened with exclusive access to rename the physical file resources.

Key Counting Methods

It is frequently helpful to return a periodic status to the user in the case of long searches, or estimations of how long a search will take. With c-tree Plus, you could periodically get the CurrentISAMKey() of the last retrieved record, then use ESTKEY() to determine its approximate ordinal positioning in the index and that, divided by NbrOfKeyEntries() provided a % complete. c-treeVCL now implements the c-treeDB corresponding functions, ctdbNumberOfKeyEntries() and ctdbEstimateSpan().

NumberOfKeyEntries() and EstimateSpan() methods have been added to the TCtRecord class.

Index Key Length Information

A KeyLength property has been added to the TCtIndex class for convenience in obtaining the index key length for the index.

TOCIndex