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

x
?
Solved

Query result

Posted on 1998-11-21
2
Medium Priority
?
158 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
[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
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 20 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

636 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