Solved

Query result

Posted on 1998-11-21
2
150 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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