Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

filter queery

Posted on 2004-03-22
1
Medium Priority
?
201 Views
Last Modified: 2010-04-05
Is there a way to filter records using
checklistbox?
Example :
In checklistbox i have city names.
I would like my queery to search for people surnames only in the city
whose name i check in the checkbox.
For surname input I use edit1.
I am using ado (queery).
0
Comment
Question by:senad
1 Comment
 

Accepted Solution

by:
rafamvc earned 200 total points
ID: 10652731
query... ok
MAke parameters, and use:

ADOQuery1.Close;
ADOQuery1.Parameters.ParamByName('ParamName1').value := 'value you want';
ADOQuery1.Open;

to make parameters, you have to make them Like this on the sql field of ADOQuery:

SELECT * FROM TableYouWish WHERE FieldToFilter = :ParamName1

then Delphi automatic add the parameter with the name u gave, this case 'ParamName1' and you can use it like i told before.

Simple ;)
[]´s
Rafael Cardoso
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question