Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Basically I want to develop a Address lookup(part of my project) using C# (and I can use SQL if necessary). I have a very large text file which have all the UK address and postcodes. Addresses needs to be looked up from this text file.

For example, as soon as a user type in the first letter of the postcode it should list all the postcodes starting with that letter and as they type in further, the list should narrow down.

Could you guys please how I can do this search very fast and list the results in a efficient way. If you guys know any methods and technologies pls do advice.

share|improve this question
    
I havent personally done this, but it looks like a trie is needed here, or something similar. –  Karthik T Nov 28 '12 at 2:51
    
You should probably start by parsing the text file into a SQL database. –  DC_ Nov 28 '12 at 4:21
    
The term you're looking for is Autocomplete. –  Robert Harvey Nov 28 '12 at 7:34

1 Answer 1

For performance issues the first thing to do would be, importing the text files into a database.

On typing you can query the affected fields with "where Field LIKE 'input%' Order by xxx" and display the result.

Depending on the amount of Data you also could load all data to your local machine and apply filters on the displayed data.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.