Search in file

Hello,
first of all I want to say that I'm a newbie programmer and also I want to sorry for my pure english.
So the problem is that I want to do simple search button in my simple program. There are two files with records like this one:
-------------------------------------------------
Date: 7/18/2007
Client: Name Name
Model: nokia 1611
IMEI: 000000000010101
Trouble: need repair
Recipient: Me
-------------------------------------------------
Button should do this. I need that on press on this button phones IMEI (which is in Edit3) shoud be found in file and printed in Memo. But! I need to print whole this information like in my example. So I need to find an IMEI and print all information about client and phone in Memo. It will be alot of records in files like this one. Also I put two CheckBoxes which separates in which file search for record.
So the biggest problem is that I don't have any example of source :( It's diferent from read from simple file any information for me :( I know there are many clever people and I hope that they will help me. Thank You very much for any help.

Comments

  • : Hello,
    : first of all I want to say that I'm a newbie programmer and also I
    : want to sorry for my pure english.
    : So the problem is that I want to do simple search button in my
    : simple program. There are two files with records like this one:
    : -------------------------------------------------
    : Date: 7/18/2007
    : Client: Name Name
    : Model: nokia 1611
    : IMEI: 000000000010101
    : Trouble: need repair
    : Recipient: Me
    : -------------------------------------------------
    : Button should do this. I need that on press on this button phones
    : IMEI (which is in Edit3) shoud be found in file and printed in Memo.
    : But! I need to print whole this information like in my example. So I
    : need to find an IMEI and print all information about client and
    : phone in Memo. It will be alot of records in files like this one.
    : Also I put two CheckBoxes which separates in which file search for
    : record.
    : So the biggest problem is that I don't have any example of source
    : :( It's diferent from read from simple file any information for me
    : :( I know there are many clever people and I hope that they will
    : help me. Thank You very much for any help.

    [code]
    Read the file record wise fscanf(fp,&record)
    struct record
    {
    declare the record
    }
    [/code]
    [B][link=http://expert.myitcareer.org/]Freelance Programmer[/link]|[link=http://myitcareer.org/]Interview Question And Answer[/link][/B]
  • : : Hello,
    : : first of all I want to say that I'm a newbie programmer and also I
    : : want to sorry for my pure english.
    : : So the problem is that I want to do simple search button in my
    : : simple program. There are two files with records like this one:
    : : -------------------------------------------------
    : : Date: 7/18/2007
    : : Client: Name Name
    : : Model: nokia 1611
    : : IMEI: 000000000010101
    : : Trouble: need repair
    : : Recipient: Me
    : : -------------------------------------------------
    : : Button should do this. I need that on press on this button phones
    : : IMEI (which is in Edit3) shoud be found in file and printed in Memo.
    : : But! I need to print whole this information like in my example. So I
    : : need to find an IMEI and print all information about client and
    : : phone in Memo. It will be alot of records in files like this one.
    : : Also I put two CheckBoxes which separates in which file search for
    : : record.
    : : So the biggest problem is that I don't have any example of source
    : : :( It's diferent from read from simple file any information for me
    : : :( I know there are many clever people and I hope that they will
    : : help me. Thank You very much for any help.
    :
    : [code]:
    : Read the file record wise fscanf(fp,&record)
    : struct record
    : {
    : declare the record
    : }
    : [/code]:
    : [B][link=http://expert.myitcareer.org/]Freelance
    : Programmer[/link]|[link=http://myitcareer.org/]Interview Question
    : And Answer[/link][/B]

    How to declare the record ?
    It's very hard to understand for me this shor explanation.
    sorry:(
Sign In or Register to comment.

Howdy, Stranger!

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

Categories