filing records - Programmers Heaven

Howdy, Stranger!

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

Categories

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.