Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access control

Posted on 1998-09-03
3
Medium Priority
?
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 40 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

604 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