Dec 092017
Paradox PAL code to combine the contents of two tables to a single keyed table.
File COMBINE.ZIP from The Programmer’s Corner in
Category Paradox DBMS
Paradox PAL code to combine the contents of two tables to a single keyed table.
File Name File Size Zip Size Zip Type
COMBINE.EXE 117440 52488 deflated
COMBINE.OVL 130776 55284 deflated
COMBINE.PAS 40456 6110 deflated
IMPORT1.DB 3072 280 deflated
IMPORT2.DB 3072 284 deflated
README 2244 991 deflated

Download File COMBINE.ZIP Here

Contents of the README file

This archive should consist of six files:

IMPORT1.DBTest Database
IMPORT2.DBTest Database
COMBINE.EXEExecutable Program
COMBINE.OVLParadox Engine Overlay
README.This file

This program takes two Paradox database files and combines them into a third table using a keyed update. The Master and Update tables are scanned for field names and types. After all identical fields (field name and type) are identified, the user is asked to specify which of these fields to perform the match/update on. The two tables are then loaded into temporary tables reflecting the user's selections for keyed fields and keys are build in conjunction with the loading process.

Records from the temporary Master are read one at a time, then specified key field values are searched for in the Update table. If a match occurs, a record is added to a Combined table. This record consists of values from the temporary Update table record for all identical fields (name & type) and values from the respective tables where a field exists in only one table. If a match is not made a new record is added to the Combined table reflecting values from the Master table only.

The Combined table's structure is composed of all fields names and types from both Master & Update tables. When a record is matched between the temporary Master & temporary Update tables it is flagged in the temporary Update table. A final pass is made to include in the Combined table all records from the temporary Update table that were not matched in the Master table and therefor flagged. Since the originating tables are keyed and the Combined table is not, it is easy to spot where this last pass is initiated by examining the formerly keyed fields in the Combined table.

To compile the source code you need TurboPower's Object Professional, Borland's Paradox Engine and Turbo Pascal v5.5 or better. This is freeware and all rights regarding the source code are waived by the author. It is a violation of copyright law to attempt to modify or reverse compile Borland's Paradox Engine overlay that accompanies this archive.

If you have any comments please send them to:

Wolfgang Kurtz
CIS: 76264, 1450
PHONE: (907)3449023

 December 9, 2017  Add comments

Leave a Reply