Search problems HELP!!!!!!!

I'm writing a program toenrool students in which I use a table called TaCursist where the indexfieldnames are Volgnr,naam,voornaam. If i try to make a search for a name he doesn't find him. I use the following code:
FieldByName('naam').AsString := Edit.text;
How can I solve this. Please help me, it's urgent
Thanx, Tom
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I dont do much database programming at the moment, but dont you have to set up a query, and pass that to the database.
Im really not sure what the question is : are you trying to execute a search on a single field of your database?
You'll only find the name if the field 'naam' has an index, otherwise,you'll have to use an SQL component in this way:


where PNAAM is a parameter passed like this:

{Set param type in  TQuery properties}

940216tdAuthor Commented:
How do I put an index on field Naam?
Just go to Database Desktop, open the table, reestructure, and then set the field you want to have an index. It's quite simple.
The index of a table is usually a code or similar and in your case you want to have an index at alumn name, so, it's up to you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Are you using an SQL server? (Look at Delphi on line help for IndexFieldNames).
If not, just use the index field alumn number in the table and use IndexFiles and IndexName properties.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.