Click here to Skip to main content
13,624,686 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all

I am having trouble trying to code a certain program and wondered if you could help. It uses an adress book in the form of a .txt file in the debug folder. The text file contains: a surname and first name, two lines of the adress and post code, a telephone number, date of birth, email adress.
I need to create a program to search this data file by surname to retrive and display the details for a contact. Also by date of birth to retrive and display all contacts with a birthday in a particular month.

I am using Microsoft visual basic 2010 express

Here is the .txt file:
Jackson Samantha,2 Heather Row,Basingstoke,RG21 3SD,01256 135434,23/04/1973,
Vickers Jonathan,18 Saville Gardens,Reading,RG3 5FH,01196 678254,04/02/1965,
Morris Sally,The Old Lodge,Hook,RG23 5RD,01256 728443,19/02/1975,
Cobbly Harry,345 The High Street,Guildford,GU2 4KJ,01458 288763,30/03/1960,
Khan Jasmine,36 Hever Avenue,Edenbridge,TN34 4FG,01569 276524,28/02/1980,
Vickers Harriet,45 Sage Gardens,Brighton,BN3 2FG,01675 662554,04/04/1968,

All help would be highly appriciated.
Thanks - Conor.
Posted 13-Jun-13 23:20pm
NotPolitcallyCorrect 14-Jun-13 5:24am
And what kind of help are you looking for? There is no question here or any kind of a description of a problem.
Conorthecoder43 14-Jun-13 5:26am
I'm just asking for someone to make the program with the task given, thanks.
NotPolitcallyCorrect 14-Jun-13 5:58am
Well no one here is going to write a program for you. You would need to go to rentacoder for that and hire someone to write the code.
Richard MacCutchan 14-Jun-13 6:04am
With a name like "Conorthecoder43" I would assume you could do this in an hour or less.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I would:
  • Parse the file (it is simple, read a line at time and use String.Split to retrieve its different field values).

Then either:
  • Store the parsed info inside a database and use such database for searching, etc...

  • Maintain such data in main memory (if feasible) and perform the seraching operation using it.

Note: with a DataSet you may actually take advantage of the database facilities without having an actual database connection.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180712.1 | Last Updated 14 Jun 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100