    (* note:  this document looks best with a mono-spaced font. *)

                 tTableDBF/tTableFilter VCL Component
                             Version 2.00
            Copyright 1995-96 Absolute Computer Consulting
                         All Rights Reserved
                            13 March 1996


How to Install
--------------

    Just the usual way :)

    1)   copy MKTABLE.* into your component path.
    2)   from Delphi choose OPTIONS | INSTALL COMPONENT
    3)   add the file MKTABLE.PAS.

    The tTableDBF and tTableFilter components should now be
    installed under the MKTools tab.


Description of TTableFilter:
----------------------------

    This component will allow you to filter your table ANY way you
    want.  It does not depend on indexes or any other BDE weirdness.
    The BIGGEST advantage of this component is that it gives you, the
    programmer, an event where you can include or exclude a record
    based on whatever selection criteria you like.

    property    OnFilter : tFilterEvent;
      tFilterEvent = function (DataSet : tDataset) : boolean of object;

      From this event, you can define if you want to include or
      exclude a record.  The function result (true or false) will
      determine if the record is included or excluded.

      function result = TRUE  we include the record.
      function result = FALSE we exclude the record.

      example (of the OnFilter method):

      function FilterEvent(DataSet : tDataSet) : boolean;
      begin
        result := DataSet.FieldByName('PROV').AsString = 'NS';
      end;

      The above line would simply filter the table and only include
      records that have the field PROV equal to NS.  Of course this is
      a very simple example, and you could add as many conditions as
      you like.

    property    Filter   : boolean;

      This property is used to determine if the filter is active or
      inactive.

    property    Table    : tTable;

      This property is used to determine what table is being filtered.
      NOTE:  The table you specify MUST not be opened exclusively!!!
      You can check out the source code to see why.



Usage of tTableDBF:
-------------------

    Use it just like a tTable component.  We only added new
    functionality to the tTable class.  An example project (testtbl)
    is included to show how to use this unit.


Description of tTableDBF:
-------------------------

    This is a descendant of tTable.  It adds the ability for dBase and
    Paradox to pack deleted records.  It also features methods to
    increase the useability of dBase expression indexes.

    Added the following methods:

    *  procedure Pack;

         Will pack the current table.  The table must either be in
         dBase or Paradox format.  The table must be opened with
         exclusive set to true.

    *  function  FindKeyDBF(KeyValue : STRING) : boolean;

         Will take the passed string and search the current index for
         an exact match.  The IndexName property must be filled in.

    *  procedure FindNearestDBF(KeyValue : STRING);

         Will take the passed string and search the current index for
         the nearest match. The IndexName property must be filled in.

    *  procedure ApplyRangeDBF(BeginKey, EndKey : STRING);

         Will take the two keys and apply a range on the table using
         the current index.  The ranges are inclusive.  This method is
         useful in displaying 1-to-many and many-to-many
         relationships. The IndexName property must be filled in.

         For a 1-to-many:  BeginKey = EndKey

         NOTE:  if the two keys are the same, an ASCII 255 will be
         appended to EndKey.

    *  procedure CancelRangeDBF;

         Will remove a range that was applied by ApplyRangeDBF.


    *  procedure RegenerateIndexes;

	      Will regenerate all indexes assigned to a table.

    * function  CompareBookmarks(First, Second : tBookmark) : boolean;
      { tBookMark is defined as: TBookmark = Pointer }

	      Will compare two bookmarks and return TRUE if they point to
         the same record.  Otherwise, it will return false.

    * property  RecordNumber

	      Will return the physical record number for the current record
         in the table.


  Written by:
  -----------

  Mark Klaamas, Absolute Computer Consulting
  13 Apollo Court
  Halifax, Nova Scotia
  Canada

  Email:
    klaamasm@tuns.ca
    or
    ag139@ccn.cs.dal.ca


  Disclaimer and License:
  -----------------------

    This VCL component and the associated files can be freely used and
    distributed in commercial and private environments, provided this
    notice is not modified in any way without my expressed written
    consent.  The tTableDBF component is released as is.  No warranty
    is implied and we are not responsible for any problems that might
    arise from the use of this unit.  You use this unit entirely at
    your own risk.

    Bugs (a.k.a. undocumented features)

    If you find any, please let us know, and we will attempt to fix
    them.  Note that bugs often depend on glitches in the system.
    Sometimes it helps to re-boot and try again...

    Feel free to contact us if you have any questions, comments or
    suggestions at klaamasm@tuns.ca


  Revision History:

      13 March 1996    (v2.00)  Updated for use with Delphi 2.0.  

      24 February 1996 (v1.10)  Added TTableFilter component and added
                                the RecordNumber property to the
                                TTableDBF component.

      06 October 1995  (v1.01)  Minor release, adding a few new methods.

      24 July 1995     (v1.00)  First release.
