Inserting a line into a text file in alphabetical order

battlecat

Registered User.
Local time
Today, 07:46
Joined
Jun 29, 2004
Messages
11
Hi,

I was wondering if anyone knows off-hand a good algorithm to insert something in alphabetical order?

I have a text file that has information on each line in alphabetical order. Sometimes additional info needs to be added, and needs to be written to the right line to keep everything in order....

I guess this doesn't related directly to access db's, but this is a functionality that I need to add to mine... so if anyone has any suggestions, I'd be ever so greatful!!!!
 
Heres one way
Link to the file from your db.
Run a make table query on the linked file
Add your record to the table
Re write a new file based on that table sorted in the order you require
Overwrite the original txt file.All this could be acheived with one button click

Regards
Bjackson
 
hi bjackson... I did just as you said and it worked perfectly! Thanks so much for the advice :)
 

Users who are viewing this thread

Back
Top Bottom