Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

filing records

hey zibadian, thanks for your reply to the earlier message :D

i was wondering if you know how file records in order after you've saved them or before you've saved them. i dont mind how as long as it results in the records being saved in order.

cheersxxxxx

Comments

  • zibadianzibadian Posts: 6,349Member
    : hey zibadian, thanks for your reply to the earlier message :D
    :
    : i was wondering if you know how file records in order after you've saved them or before you've saved them. i dont mind how as long as it results in the records being saved in order.
    :
    : cheersxxxxx
    :
    :
    If you want to sort records, you'll probably need to do that before saving them. The sort routine itself depends on how you have stored the records in the memory. In case of a TList object, you just call the Sort() method with the correct compare function (see help files). All database components have methods to sort their data, although I don't know them from memory. If the data is stored in an array, you'll probably want to code the bubble or selection sort. The quick-sort is significantly faster (at large number of records) than either, but is quite a difficult to code.
Sign In or Register to comment.