Solved

Query result

Posted on 1998-11-21
2
148 Views
Last Modified: 2010-04-04
OK, I've used sql to get the sum of a table field, but what code do i need to show this result in a DBText field. Thanx.
0
Comment
Question by:cavalry
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 10 total points
ID: 1347509
cavalry,

 use select Sum(..) as sumofvalue from ...

Then go to the fieldeditor. Read in fields, there you'll find sumofvalue. Then go to dbtext. Select correct database, select sumofvalue as field.

Regards, Zif.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1347510
hi cavalry,

a other method to show static values
if the sum the only field in your query you can use Fields[0]

  query1.open;
  label1.Caption := floattostr(query1.Fields[0].AsFloat);
  query1.Close;

thats recommends no use of dbtextfield.

if you will use dbtextfield, then use zifs answer

meikl

meikl
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

778 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