Solved

Access control

Posted on 1998-09-03
3
133 Views
Last Modified: 2010-04-04
I want to use a query to select a column from a table and display it, but not in a grid. What other posibilities I have?
0
Comment
Question by:braso
3 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1338620
If there is only one colum I think TListBox is sufficient, however if you seek for multiple columns you'd better use TListView. In each case I recoment you to conduct a HIDDEN grid, make the querry and transfer the grid column to the list.
Regards, Igor
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1338621
Hey braso, hey Igor! You can also do this without a grid - just open a TQuery, and go through the records adding them wherever you want until TQuery.EOF.
0
 
LVL 7

Accepted Solution

by:
Motaz earned 20 total points
ID: 1338622
You can use List box and read the Query record set in a loop until end of Query table :

ListBox1.Items.Clear;   // Result list
Query1.First;                // Your SQL query component

while not Query1.Eof do
 begin
   ListBox1.Items.Add(Query1.Fields[0].AsString); // First field
   Query1.Next;
 end;

// That's all.. very simple !!. Isn't it ?


Motaz from Sudan.
motaz1@yahoo.com
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 324
Delphi component that can load a DLL in design time? 8 74
Communication Between RC4 Delphi <-> PHP 3 123
Multiple image collision 13 80
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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