winfave@dutrun.UUCP (Alexander Verbraeck) (12/21/89)
Up till now, I have developed quite a lot of software using Turbo Pascal (2.0, 3.0, 4.0, 5.0 and recently 5.5) with the database toolbox (currently version 4.0). One of my customers used the program and added some 3000 records to the database. Everything worked fine until the 3170th record was reached. The database still works fine (FindKey, GetRec, PutRec etc.), but the index seems corrupt. After a ClearKey followed by a repeat ... NextKey ... until (not OK) or ... the program either hangs or gives a Disk Read Error. Of course I tried debugging the program using the Turbo Debugger, and it seems there is an illegal record number somewhere in the B-tree. I rebuilt the index a zillion times, but the error persists. I traced the procedures and it seems to go wrong during a PutRec (???) called from TAGetPage. The strange thing is that TAGetPage has the following header: procedure TAGetPage(var IdxF : IndexFile; R : Integer; var PgPtr : TaPagePtr); R is an integer in this header. When calling TAGetPage, a parameter R of type Longint is passed. The R is used in the PutRec call. Is this a error? Does someone have a more recent version of the Turbo Database toolbox with a changed header of the TAGetPage procedure? ---------------------------------------------------------------------- Alexander Verbraeck e-mail: winfave@dutrun.tudelft.nl Delft University of Technology winfave@hdetud1.bitnet Department of Information Systems winfave@dutrun.uucp PO Box 356, 2600 AJ The Netherlands dutrun!winfave@hp4nl.uucp ----------------------------------------------------------------------
mike@raven.USS.TEK.COM (Mike Ewan) (12/22/89)
In article <1052@dutrun.UUCP> winfave@dutrun.UUCP (A.Verbraeck) writes: [...] >(currently version 4.0). One of my customers used the program and added >some 3000 records to the database. Everything worked fine until the >3170th record was reached. The database still works fine (FindKey, >GetRec, PutRec etc.), but the index seems corrupt. After a ClearKey >followed by a repeat ... NextKey ... until (not OK) or ... the program >either hangs or gives a Disk Read Error. I ran into the same problem. Here's the solution, first when you 'tabuild' the taccess unit, it assumes the max number of records is 1000. So your page sizes are wrong for anything over that. What you need to do is run 'tabuild /W+ file.typ'. Then when the configuration screen comes up select the max number of records as something like 32000. There's little overhead for large number and it'll sure save a lot of headaches later. You can also play around with the entries per page and page stack size variables if you want.