If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Delphi database query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-03, 02:37
jrahma jrahma is offline
Registered User
 
Join Date: Apr 2003
Posts: 101
Delphi database query

I am a beginner in delphi and using the following command to get the count of records based on SQL query:

Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Add('Select COUNT(*) AS total_count from myDBName where myField = 999');
Query1.Open;


now I need to read total_count value and put it into an Edit textBox, how can I do that?


Many Thanks,
Jassim Rahma
Reply With Quote
  #2 (permalink)  
Old 05-05-03, 06:35
jora jora is offline
Registered User
 
Join Date: Dec 2002
Location: Antwerp, Belgium
Posts: 227
edit.text := query1.FieldByName('total_count').AsString;
__________________
Johan
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On