| Class TTableDBF (unit MKTable) |
tTable
class TTableFilter } { --------------------------------------------------------------------------- } Definition of derivate table component.
| Constructors |
| Functions |
procedure ApplyRangeDBF(BeginKey, EndKey : STRING);
procedure CancelRangeDBF;
function CompareBookmarks(First, Second : tBookmark) : boolean;--------------------------------------------------------------------------- } A function that will compare two bookmarks and return if they point to the same data record.
function FindKeyDBF(KeyValue : STRING) : boolean;
procedure FindNearestDBF(KeyValue : STRING);
procedure Pack;Find out what type of table is currently opened.
procedure RegenerateIndexes;
function Chk(rslt: DbiResult): DbiResult;Pack the dBase Table
function GetTableType: PChar;
function FindRecordNumber: longint;
procedure PackDBaseTable;Re-Open the table
procedure PackParadoxTable;| Properties |
property RecordNumber : longint| Events |
| Variables |
| Constructors |
| Functions |
procedure ApplyRangeDBF(BeginKey, EndKey : STRING);--------------------------------------------------------------------------- } This method is used to apply a range to the database table. It uses the passed STRING values to set the range. It was designed to use with dBase expression indexes. NOTE: This method can be used to setup master-detail forms. Just use the master table to set the range in the detail table. NOTE: If BeginKey and EndKey are the same, an ASCII 255 is added to the EndKey so that all matching records for BeginKey are displayed.
procedure CancelRangeDBF;--------------------------------------------------------------------------- } This method will remove a range that was applied by the ApplyRangeDBF method. It will more than likely remove any ranges that are set!
function CompareBookmarks(First, Second : tBookmark) : boolean;tBookMark is defined as: TBookmark = Pointer
--------------------------------------------------------------------------- } A function that will compare two bookmarks and return if they point to the same data record.
function FindKeyDBF(KeyValue : STRING) : boolean;--------------------------------------------------------------------------- } Function that will find a matching record in the table by using the passed KeyValue to do the search. This method was designed to be used with dBase expression indexes.
procedure FindNearestDBF(KeyValue : STRING);FindKeyDBF } { --------------------------------------------------------------------------- } Function that will find the nearest matching record (greater than or euqal) in the table by using the passed KeyValue to do the search. This method was designed to be used with dBase expression indexes.
procedure Pack;Public declarations
Find out what type of table is currently opened. NOTE: This is different than tTableDBF.TableType
procedure RegenerateIndexes;--------------------------------------------------------------------------- } Procedure to regenerate all indexes for the table.
function Chk(rslt: DbiResult): DbiResult;Protected declarations
Pack the dBase Table
function GetTableType: PChar;--------------------------------------------------------------------------- } The code that will pack a dBase or Paradox table was written by Steve Teixeira (Borland Tech Support). I found the code on a web page. It had no copyright notice or even an author in the source code, so I incorporated it into my class. I thank Steve for releasing this code to the masses. His class was called tTablePack. It allowed the packing of dBase and Paradox tables. { ---------------------------------------------------------------------------
function FindRecordNumber: longint;--------------------------------------------------------------------------- } { ----------------- tTableDBF component ----------------------------------- } { --------------------------------------------------------------------------- } {find record number
procedure PackDBaseTable;Private declarations
Re-Open the table
procedure PackParadoxTable;PARADOX and dBase table are the only types that can be packed
| Properties |
property RecordNumber : longint| Events |
| Variables |