home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / BTP20.ZIP / README.1ST < prev    next >
Encoding:
Text File  |  1993-06-10  |  8.3 KB  |  153 lines

  1. README.1ST
  2. ----------
  3.  
  4. BTP - The Btrieve Unit for Turbo Pascal 7.0              (C) 1993 John C. Leon
  5. (* ------------------------------------------------------------------------ *)
  6. Version 2.0  6/10/93
  7.  
  8. ** DISCLAIMER AND LICENSE ***************************************************
  9. This unit was authored by and is the copyrighted property of John C. Leon.
  10. It is supplied without warranty of any kind, and without any representations
  11. as to its usefulness or adequacy for any task.  Under no circumstances does
  12. the author take any responsiblity for loss or damage, alleged or actual,
  13. arising from usage of this property.  Use at your own risk.
  14.  
  15. Use of this product beyond an initial trial period of 30 days obligates you
  16. to remit the registration fee of $25 to:
  17.  
  18.                       John C. Leon
  19.                       3807 Wood Gardens Court
  20.                       Kingwood, TX  77339
  21.  
  22.                       713-359-3641     (residence)
  23.                       CIS #72426,2077  (Email responded to promptly)
  24.  
  25. *****************************************************************************
  26.  
  27.  
  28. Pre-Requisites to Using this Software
  29. =====================================
  30. This unit provides a rich suite of Btrieve programming tools.  However, it is
  31. NOT an educational tool.  While proven to be extremely easy to use, it is
  32. assumed that you are familiar with Turbo Pascal 7.0, use of dynamic variables
  33. and pointers, object-oriented programming, and Novell's Btrieve product.
  34. BTP requires Turbo Pascal 7.0 and will NOT function with prior releases.
  35.  
  36. This unit was designed with, and has only been tested with, version 5.10a of
  37. Btrieve, with all patches available as of each version's release date
  38. applied.  WARNING!  I cannot assure accurate functioning of this unit with
  39. prior versions of Novell's Btrieve product.
  40.  
  41. WHAT IT DOES!
  42. -------------
  43. It makes the Btrieve black box friendly!
  44.  
  45. Total support for standard, fixed-length Btrieve files, using all standard
  46. calls and the get/step extended calls.  While no specific support exists for
  47. extended insert calls, such calls can readily be made; an example of extended
  48. insert calls is in example program CRUNCH2.PAS.
  49.  
  50. By simply instantiating a BTP object, you:  open a Btrieve file in any
  51. mode, supply any required owner name, retrieve a copy of its current stats
  52. and structure, encapsulate a private position block, and can (with a properly
  53. built descendant), easily refer to all your fields by name.  Most standard
  54. Btrieve operations require just two parameters to a single method (retaining
  55. the simplicity of the single "universal" Btrieve call), supplying JUST TWO
  56. PARAMETERS (the op code and key number).
  57.  
  58. Special utility functions are provided for file creation, adding supplemental
  59. indexes, and cloning files.
  60.  
  61. You should find that the drudgery of using extended calls is substantially
  62. reduced.  Refer to CRUNCH2.PAS, and EXAMPLE2.PAS for examples of using BTP
  63. to greatly simplify working with extended calls.
  64.  
  65. INCLUDED in this distribution package are several useful Btrieve utilities
  66. that make full use of this unit.  The CLONE and CRUNCHx programs, in
  67. particular, illustrate the extraordinary ease of Btrieve programming with
  68. BTP!  The STATS program displays the same information as Novell's BUTIL
  69. program.  These utility programs alone are worth the $25 registration fee.
  70. Further, you are authorized to distribute these compiled utilities
  71. freely SO LONG AS YOU DO NOT MODIFY THE SOURCE CODE IN ANY WAY (INCLUDING MY
  72. COPYRIGHT NOTICES AND NAME) *AND* have registered your copy of the product.
  73.  
  74. Full details on BTP are to be found in the BTP.DOC file.  Aside from standard
  75. TP7-style OOP techniques, BTP uses collections to handle a list of filter and
  76. extractor specs for extended calls.  That's as sexy as it gets.  You don't
  77. even need to understand collections...just use them as illustrated in BTP.DOC,
  78. CRUNCH2.PAS and EXAMPLE2.PAS!  BTP creates, maintains, and disposes of those
  79. collections for you.  These collections and the provided object methods will
  80. transparently set buffer lengths for you, and construct your outgoing data
  81. buffers for extended calls.  THE SETUP DRUDGERY FOR GET/STEP EXTENDED CALLS
  82. IS COMPLETELY REMOVED!!
  83.  
  84. It is imperative that you read the sample programs and documentation.  They
  85. are structured carefully to take you gradually from the simplest BTP
  86. structures to the more "advanced".  The best news is that even the advanced
  87. structures are a piece of cake to deal with!  The suggested order for
  88. reviewing the programs is:
  89.  
  90. 1. VERSION: Quite simply, the shortest Btrieve program possible.  Just
  91.             displays a message revealing what Btrieve version is running.
  92. 2. STATS:   Reports stats on any Btrieve file.  Makes a single BTP style call,
  93.             after which you can immediately read the object's data fields
  94.             containing the file's stats.  Is an effective replacement for
  95.             'BUTIL - STAT', and in compiled form can be distributed with your
  96.             applications freely under the conditions mentioned above.
  97. 3. CLONE:   Execute just one BTP function to create a clone of any standard,
  98.             fixed-length or variable-length Btrieve file, handling supple-
  99.             mental indexes from the source file any way you choose (you can
  100.             drop/retain/make them permanent in the clone by simply providing
  101.             the appropriate parameter to the CloneFile function)!
  102. 4. CREATE1: Example of creating a new file on the fly from within your appli-
  103.             cation.  Set the values in one BTP data type, and call one
  104.             function!  Included in this .ZIP file is a file named
  105.             CREATE1.SPC.  This is a standard description (spec) file that can
  106.             be used to create the 'EXAMPLE' Btrieve file with Btrieve's own
  107.             BUTIL program.  CREATE1.SPC is provided only to demonstrate that
  108.             the CreateFile function in the BTP product does generate files
  109.             that are byte-for-byte the same as if you used 'BUTIL -create'.
  110. 5. CREATE2: Similar to CREATE1.  Creates a Btrieve file, then WITH ONE
  111.             SIMPLE FUNCTION CALL adds a supplemental index that uses an
  112.             alternate collating sequence.  Piece of cake w/BTP!
  113.  
  114.             SUGGESTION: After running CREATE2, try using "BUTIL -CLONE" to
  115.             clone the file.  It will fail to properly duplicate the file
  116.             structure!  Then use the CLONE program provided herein:
  117.                "CLONE yourfilename yourclonename RETAIN BTP" (BTP is the
  118.                                                               file's owner
  119.                                                               name)
  120.             Not bad, eh?
  121. 6. CRUNCH1: Creates a duplicate of a file, effectively "squishing" the file
  122.             to remove dead space.  Opens source file in read-only mode,
  123.             creates the target file and opens it in accelerated mode.  Reads
  124.             records one at time from source file, inserts them one at a time
  125.             into target file.  Uses non-extended calls exclusively.
  126. 7. CRUNCH2: Performs same functions as CRUNCH1, but uses extended inserts
  127.             and step next extended calls.
  128. 8. EXAMPLE1:A simple program using BTP to insert records into a file of names.
  129.             Provided only to illustrate use of BTP and several Btrieve calls.
  130. 10.EXAMPLE2:Another simple program using BTP with extended calls.  Provided
  131.             only to illustrate syntax of initializing filter and extractor
  132.             specs for extended calls, and required function overrides.
  133.  
  134. ADDITIONAL BTP FEATURES
  135. =======================
  136. IMPORTANT -
  137. The universal Btrv function call IS INCLUDED in the BTP unit.  When using
  138. BTP, do NOT include the call from any other source.  It is used internally
  139. by BTP, and is available directly in its 'native' form if needed, exactly as
  140. defined on the Btrieve distribution disks from Novell.
  141.  
  142. TP7's features have made it a pleasure to code this unit.  I hope you'll find
  143. that BTP and OOP techniques can make Btrieve programming a whole lot more
  144. productive and pleasurable.
  145.  
  146. The DOTPC.BAT and DOBPC.BAT files are provided for your convenience.  Assuming 
  147. the command line compiler, TPC.EXE or BPC.EXE, and a properly configured 
  148. TPC.CFG or BPC.CFG file are in your  path, you can run DOTPC or DOBPC to 
  149. compile BTP and all the example programs quickly.
  150.  
  151. ENJOY!  Constructive criticism and suggestions welcome.
  152.  
  153.