Solved

Query result

Posted on 1998-11-21
2
143 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now