×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

VB6 Sorting records

VB6 Sorting records

VB6 Sorting records

(OP)
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?

RE: VB6 Sorting records

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.

RE: VB6 Sorting records

(OP)
During research I have found the 'RADIX' sort, very fast and very stable.

Would recommend it to anyone sorting large files.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources