home *** CD-ROM | disk | FTP | other *** search
- README.1ST
- ----------
-
- BTP - The Btrieve Unit for Turbo Pascal 7.0 (C) 1993 John C. Leon
- (* ------------------------------------------------------------------------ *)
- Version 2.0 6/10/93
-
- ** DISCLAIMER AND LICENSE ***************************************************
- This unit was authored by and is the copyrighted property of John C. Leon.
- It is supplied without warranty of any kind, and without any representations
- as to its usefulness or adequacy for any task. Under no circumstances does
- the author take any responsiblity for loss or damage, alleged or actual,
- arising from usage of this property. Use at your own risk.
-
- Use of this product beyond an initial trial period of 30 days obligates you
- to remit the registration fee of $25 to:
-
- John C. Leon
- 3807 Wood Gardens Court
- Kingwood, TX 77339
-
- 713-359-3641 (residence)
- CIS #72426,2077 (Email responded to promptly)
-
- *****************************************************************************
-
-
- Pre-Requisites to Using this Software
- =====================================
- This unit provides a rich suite of Btrieve programming tools. However, it is
- NOT an educational tool. While proven to be extremely easy to use, it is
- assumed that you are familiar with Turbo Pascal 7.0, use of dynamic variables
- and pointers, object-oriented programming, and Novell's Btrieve product.
- BTP requires Turbo Pascal 7.0 and will NOT function with prior releases.
-
- This unit was designed with, and has only been tested with, version 5.10a of
- Btrieve, with all patches available as of each version's release date
- applied. WARNING! I cannot assure accurate functioning of this unit with
- prior versions of Novell's Btrieve product.
-
- WHAT IT DOES!
- -------------
- It makes the Btrieve black box friendly!
-
- Total support for standard, fixed-length Btrieve files, using all standard
- calls and the get/step extended calls. While no specific support exists for
- extended insert calls, such calls can readily be made; an example of extended
- insert calls is in example program CRUNCH2.PAS.
-
- By simply instantiating a BTP object, you: open a Btrieve file in any
- mode, supply any required owner name, retrieve a copy of its current stats
- and structure, encapsulate a private position block, and can (with a properly
- built descendant), easily refer to all your fields by name. Most standard
- Btrieve operations require just two parameters to a single method (retaining
- the simplicity of the single "universal" Btrieve call), supplying JUST TWO
- PARAMETERS (the op code and key number).
-
- Special utility functions are provided for file creation, adding supplemental
- indexes, and cloning files.
-
- You should find that the drudgery of using extended calls is substantially
- reduced. Refer to CRUNCH2.PAS, and EXAMPLE2.PAS for examples of using BTP
- to greatly simplify working with extended calls.
-
- INCLUDED in this distribution package are several useful Btrieve utilities
- that make full use of this unit. The CLONE and CRUNCHx programs, in
- particular, illustrate the extraordinary ease of Btrieve programming with
- BTP! The STATS program displays the same information as Novell's BUTIL
- program. These utility programs alone are worth the $25 registration fee.
- Further, you are authorized to distribute these compiled utilities
- freely SO LONG AS YOU DO NOT MODIFY THE SOURCE CODE IN ANY WAY (INCLUDING MY
- COPYRIGHT NOTICES AND NAME) *AND* have registered your copy of the product.
-
- Full details on BTP are to be found in the BTP.DOC file. Aside from standard
- TP7-style OOP techniques, BTP uses collections to handle a list of filter and
- extractor specs for extended calls. That's as sexy as it gets. You don't
- even need to understand collections...just use them as illustrated in BTP.DOC,
- CRUNCH2.PAS and EXAMPLE2.PAS! BTP creates, maintains, and disposes of those
- collections for you. These collections and the provided object methods will
- transparently set buffer lengths for you, and construct your outgoing data
- buffers for extended calls. THE SETUP DRUDGERY FOR GET/STEP EXTENDED CALLS
- IS COMPLETELY REMOVED!!
-
- It is imperative that you read the sample programs and documentation. They
- are structured carefully to take you gradually from the simplest BTP
- structures to the more "advanced". The best news is that even the advanced
- structures are a piece of cake to deal with! The suggested order for
- reviewing the programs is:
-
- 1. VERSION: Quite simply, the shortest Btrieve program possible. Just
- displays a message revealing what Btrieve version is running.
- 2. STATS: Reports stats on any Btrieve file. Makes a single BTP style call,
- after which you can immediately read the object's data fields
- containing the file's stats. Is an effective replacement for
- 'BUTIL - STAT', and in compiled form can be distributed with your
- applications freely under the conditions mentioned above.
- 3. CLONE: Execute just one BTP function to create a clone of any standard,
- fixed-length or variable-length Btrieve file, handling supple-
- mental indexes from the source file any way you choose (you can
- drop/retain/make them permanent in the clone by simply providing
- the appropriate parameter to the CloneFile function)!
- 4. CREATE1: Example of creating a new file on the fly from within your appli-
- cation. Set the values in one BTP data type, and call one
- function! Included in this .ZIP file is a file named
- CREATE1.SPC. This is a standard description (spec) file that can
- be used to create the 'EXAMPLE' Btrieve file with Btrieve's own
- BUTIL program. CREATE1.SPC is provided only to demonstrate that
- the CreateFile function in the BTP product does generate files
- that are byte-for-byte the same as if you used 'BUTIL -create'.
- 5. CREATE2: Similar to CREATE1. Creates a Btrieve file, then WITH ONE
- SIMPLE FUNCTION CALL adds a supplemental index that uses an
- alternate collating sequence. Piece of cake w/BTP!
-
- SUGGESTION: After running CREATE2, try using "BUTIL -CLONE" to
- clone the file. It will fail to properly duplicate the file
- structure! Then use the CLONE program provided herein:
- "CLONE yourfilename yourclonename RETAIN BTP" (BTP is the
- file's owner
- name)
- Not bad, eh?
- 6. CRUNCH1: Creates a duplicate of a file, effectively "squishing" the file
- to remove dead space. Opens source file in read-only mode,
- creates the target file and opens it in accelerated mode. Reads
- records one at time from source file, inserts them one at a time
- into target file. Uses non-extended calls exclusively.
- 7. CRUNCH2: Performs same functions as CRUNCH1, but uses extended inserts
- and step next extended calls.
- 8. EXAMPLE1:A simple program using BTP to insert records into a file of names.
- Provided only to illustrate use of BTP and several Btrieve calls.
- 10.EXAMPLE2:Another simple program using BTP with extended calls. Provided
- only to illustrate syntax of initializing filter and extractor
- specs for extended calls, and required function overrides.
-
- ADDITIONAL BTP FEATURES
- =======================
- IMPORTANT -
- The universal Btrv function call IS INCLUDED in the BTP unit. When using
- BTP, do NOT include the call from any other source. It is used internally
- by BTP, and is available directly in its 'native' form if needed, exactly as
- defined on the Btrieve distribution disks from Novell.
-
- TP7's features have made it a pleasure to code this unit. I hope you'll find
- that BTP and OOP techniques can make Btrieve programming a whole lot more
- productive and pleasurable.
-
- The DOTPC.BAT and DOBPC.BAT files are provided for your convenience. Assuming
- the command line compiler, TPC.EXE or BPC.EXE, and a properly configured
- TPC.CFG or BPC.CFG file are in your path, you can run DOTPC or DOBPC to
- compile BTP and all the example programs quickly.
-
- ENJOY! Constructive criticism and suggestions welcome.
-
-