Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    137

    Unanswered: 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

  2. #2
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    edit.text := query1.FieldByName('total_count').AsString;
    Johan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •