home *** CD-ROM | disk | FTP | other *** search
- BTP - The Btrieve Unit for Turbo Pascal 6.0 (C) 1991 John C. Leon
- (* ------------------------------------------------------------------------ *)
- Version 1.4, 10/27/91
-
- ** 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.
-
- THIS PRODUCT IS *NO LONGER* FREEWARE. Use of this product beyond an initial
- trial period of 30 days obligates you to remit the registration fee of $25
- (for a non-corporate, non-commercial license) to:
-
- John C. Leon
- 3807 Wood Gardens Court
- Kingwood, TX 77339
-
- 713-359-3641 (residence)
- CIS #72426,2077 (Email responded to promptly)
-
- Corporate users must contact me directly for licensing terms. Production of
- a commercial product using this unit is strictly forbidden without permission
- and license.
-
- Coming soon ONLY for licensed users...a Turbo Vision based Btrieve utility
- program for creating files, adding/dropping supplemental indices, reporting
- stats, cloning and crunching files, etc, etc. Will be free to all registered
- BTP owners.
- *****************************************************************************
-
- 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 6.0, use of dynamic variables
- and pointers, object-oriented programming, and Novell's Btrieve product.
- BTP requires Turbo Pascal 6.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 current patches applied. WARNING! Do NOT use with other
- versions! Having said that, I have every reason to believe it will work fine
- with prior versions if you don't try to use the op codes that apply to later
- versions.
-
- WHAT IT DOES!
- -------------
- It makes the Btrieve black box friendly!
-
- Total support ONLY for standard, fixed-length Btrieve files and non-extended
- Btrieve ops. Terrific support for the "read" extended calls (the 4 get and
- step extended calls), with an example (see EXAMPLE2.PAS) of how to use insert
- extended calls.
-
- Imagine opening a Btrieve file in any mode, saving a "permanent" copy of its
- stats and structure, establishing and isolating its position block, and being
- able to refer to all your fields by name...all with just ONE SIMPLE CALL with
- only TWO PARAMETERS!!! NO BTRIEVE CALL MADE WITH THIS UNIT'S TECHNIQUES
- REQUIRES MORE THAN TWO PARAMETERS (the op code and key number). This is ONLY
- made possible with object-oriented programming and the encapsulation it
- provides.
-
- 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!
-
- Full details on BTP are to be found in the BTP.DOC file. Aside from standard
- TP6-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! 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 send buffers for extended calls. THE
- DRUDGERY 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: Also short, 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.
- 3. CLONE: Short and sweet. Make one BTP style call, then execute just one
- BTP function to create a clone of the source file!
- 4. CREATE: Example of creating a new file. Set the values in one BTP data
- type, and call one function!
- Included in this .ZIP file is a file named EXAMPLE.SPC. This is a
- standard description (spec) file that can be used to create the
- 'EXAMPLE' Btrieve file with Btrieve's own BUTIL program.
- EXAMPLE.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. 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. Uses
- non-extended calls exclusively.
- 6. CRUNCH2: Performs same functions as CRUNCH1, but uses extended inserts
- to populate target table.
- 7. CRUNCH3: Performs same functions as CRUNCH1, but uses step next extended
- and extended inserts.
- 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.
- 9. EXAMPLE2:Another simple program using BTP with extended calls. Provided
- to illustrate syntax of initializing filter and extractor specs
- for extended calls, and required function overrides.
-
- ADDITIONAL BTP FEATURES
- =======================
- The BTP unit provides an initialization section that checks for presence of
- Btrieve in memory before running your main program. You need never code such
- a test yourself again. Just 'USES' this unit, and you're covered.
-
- 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.
-
- Pascal's features have made it a pleasure to code this unit. The inherent
- capabilities of Pascal records, in all their forms, have greatly facilitated
- what at first seemed a VERY difficult task. The encapsulation provided by
- object-oriented programming have reduced quick and dirty Btrieve programming
- to what it should be...quick (but not dirty!). Examine the unit's source
- code and the example programs carefully. You should find everything there
- you'll ever need. If it ain't there, let me know and we'll make 'er better!
-
-
- ENJOY! Constructive criticism and suggestions welcome.
-
- John C. Leon
- October 27, 1991
-