Solved

filter queery

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Path  to current project in Delphi. 2 79
Newbie Thread Programming 1 152
Delphi Mdi application Child forms get behind control 7 213
Delphi: Connect to running MS Outlook 4 86
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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