Solved

filter queery

Posted on 2004-03-22
1
192 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 50 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now