Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dBASE III + sorting problem

Status
Not open for further replies.

orschep

Technical User
Feb 6, 2008
4
CA
Hi,

I have a problem that I hope someone can help me with.
I have a dBASEIII+ database file that has 192,456 records in it. I recently added 276 records to it and then tried to sort the file. It progressed to 82% sorted and then displayed the following error: Records do not balance (program error). 192732 100% sorted 192732 Records sorted56 639856 3. I then deleted the new records and it sorted fine. I then added a few records at a time and it sorted fine up until a certain point. I have not determined the exact number of records where this occurs. Has anyone seen this error before?

Please Help !
 
Does the DBF have associated indexes? If so are they open when you append or add the records. Are you appending in mass or adding one at a time thru a interface.

Jim C.


 
To sort a table you need 3 times the drive space free that is equal to the size of the DBF + FPT + IDX's open.

It is best to close/delete your indexes Add the records, sort the records, reindex.

Check the drive space. If your doing it on a network drive, make sure you have allocated enought usable drive space for the operation.



David W. Grewe Dave
 
Just thought of another way
Open DBF and Index on the sort method to use
Add the records
reindex
copy to sorted.dbf
close tables
delete orgdbf
rename sortdbf to orgdbf
(same for FPT if one)
then open all indexes and reindex.

that would take up less drive space for the operation.


David W. Grewe Dave
 
Thanks for the replies. The DBF does have 3 associated indexes, but I do not have them opened when I try to sort the file. I am appending in mass, not through an interface.
The file is just over 16MB in size and I have tried to sort it on both my hard drive (62GB of free space) and a network drive (104GB of free space) with the same results. I have gotten around the problem by splitting the DBF into two DBFs and adding the records to the appropriate DBF and then appending them back together. Obviously I would like to resolve the problem as I need to add to this DBF on a regular basis. Could ram (my computer has 2 GB)be a limiting factor? Thanks again for your time.
 
Could one of the sorted fields be encountering a non-ASCII character in one of the records being added? Sometime the characters outside normal ranges such as below ASC(32) cause problems in indexes, especially ASC(0). Maybe that goes for sorts too?

But if you do the same thing in the table when it is split in half and it works, then maybe that's not the problem. Could it be that the table has hit 16MB in size? I don't recall the limits of dBaseIII+ offhand...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top