Technical Information Database
TI62D.txt - Database Toolbox suggestions/corrections
Category :Turbo Pascal
Platform :All
Product :
Description:
This handout addresses some problems which have been reported by
users of the Turbo Pascal DataBase ToolBox version 4.0 for use with
Turbo Pascal 4.0.
Correction
When accessing an Index File that allows duplicate keys and has
greater than 32K records, the Index Key routines, FindKey and
SearchKey will be unsuccessful in finding keys for records past
32K. By making the following changes to TACCESS.PAS, this proble
1. In the TaCompKeys procedure change the old code to look as
follows:
begin
if TaKeyStr(K1) = TaKeyStr(K2) then
begin
if not Dup or (DR1 = DR2) then
TaCompKeys := 0
else
if DR1 > DR2 then
TaCompKeys := 1
else
TaCompKeys := -1;
end
else
if TaKeyStr(K1) > TaKeyStr(K2) then
TaCompKeys := 1
else
TaCompKeys := -1;
end;
2. Save the changes to TACCESS.PAS. Call TaBuild for each
.TYP file to create a new TACCESS.TPU file. Rebuild all Index
Files.
Recommended Suggestion
Users have reported unusual errors occurring in their DataBase
ToolBox programs. Many of these errors can be solved by running
TaBuild with the /W+ option to display the worksheet. The
worksheet will show that 1,000 records will be the expected size
of
For existing Data Files, where greater than 1,000 records are
expected, it is recommended that you build a new TACCESS unit
using the worksheet to set the maximum number of records. This
requires that all Index Files be rebuilt.
Reference:
3/30/99 3:15:25 PM
Last Modified: 01-SEP-99