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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Sorting records

Status
Not open for further replies.

derrick

Computer
Joined
Jun 13, 2001
Messages
40
Location
GB
I need to read a file containing about 250,000 records, sort them, and write the resulting list to another file.

List boxes are restricted to an index of 32,767. Although I can enter more items in a sorted listbox and refer to them in order by reading the first index, then deleting it so that the next list item is available, the sorting is far too slow.

Is an array of records using a sorting algorithm the best answer?

Any brillaint solutions anyone?
 
I've never done it, but I believe that ADO can read text files as a recordset. This then provides access to the ADO sorting and recordset handling capabilities. Mayble this would help.

Alternatively, unless this specifically needs to be done through VB, you could use MS Excel.
 
During research I have found the 'RADIX' sort, very fast and very stable.

Would recommend it to anyone sorting large files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top