home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI426.ASC < prev    next >
Encoding:
Text File  |  1988-05-02  |  1.9 KB  |  59 lines

  1.  
  2. This handout addresses some  problems which have been reported by
  3. users of the Turbo Pascal DataBase ToolBox version 4.0
  4.  
  5. Correction
  6.  
  7. When accessing an Index File that allows duplicate keys and has
  8. greater than 32K records, the Index Key routines, FindKey and
  9. SearchKey will be unsuccessful in finding keys for records past
  10. 32K.  By making the following changes to TACCESS.PAS, this
  11. problem will be corrected.  Please make sure that any changes are
  12. made to a backup copy of the Database Toolbox, not the original.
  13.  
  14. 1.  In the TaCompKeys procedure change the old code,
  15.  
  16. begin
  17.   if TaKeyStr(K1) = TaKeyStr(K2) then
  18.     if Dup then
  19.       TaCompKeys := DR1 - DR2
  20.     else TaCompKeys := 0
  21.     .
  22.     .
  23.  
  24. to look as follows:
  25.  
  26. begin
  27.   if TaKeyStr(K1) = TaKeyStr(K2) then
  28.     if Dup then
  29.     begin
  30.       if DR1 > DR2 then
  31.         TaCompKeys := 1
  32.       else
  33.         TaCompKeys := -1;
  34.     end
  35.     else TaCompKeys := 0
  36.     .
  37.     .
  38.  
  39. 2.  Save the  changes to TACCESS.PAS.  Call TaBuild  for each
  40. .TYP file to  create a new  TACCESS.TPU file.  Rebuild  all Index
  41. Files.
  42.  
  43. Recommended Suggestion
  44.  
  45. Users have reported unusual errors occuring in their DataBase
  46. ToolBox programs.  Many of these errors can be solved by running
  47. TaBuild with the /W+ option to display the worksheet.  The
  48. worksheet will show that 1,000 records will be the expected size
  49. of the Data File.  It is neccessary that this value be changed to
  50. reflect the maximum number of records possible for the Data File.
  51. The data segment overhead for specifying 100,000 records as
  52. opposed to 1,000 records is approximately 24 bytes additional per
  53. defined IndexFile.
  54.  
  55. For existing Data Files, where greater than 1,000 records are
  56. expected, it is recommended that you build a new TACCESS unit
  57. using the worksheet to set the maximum number of records. This
  58. requires that all Index Files be rebuilt.
  59.