GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  Delphi
Go To First  |  Previous Question  |  Next Question 
 Delphi  |  Question 10 of 27    Print  
How is OnCalcFields event handler used in Delphi?

  
Total Answers and Comments: 1 Last Update: July 28, 2007     Asked by: Robert 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 28, 2007 08:13:27   #1  
Dusko Acevski        

RE: How is OnCalcFields event handler used in Delphi?

Hi Robert

OnCalculate is event in Delphi it trigerrs when you are reading data from the database .

NOTE : It trigerrs on reading each row
Stupid Example :
if you want to subtract two coolumns from database table then you override this event with

procedure TForm1.ADOQuery1CalcFields(DataSet: TDataSet);
begin
Variable_b adoQuery1.fieldByname('Name_Of_the_DbColumn1').asfloat +adoQuery1.fieldByname('Name_Of_the_DbColumn2').asfloat;

Showmessage(floattostr(Variable_b));
end;

Regards Dusko Acevski


 
Is this answer useful? Yes | No

 Related Questions

Here are some suggested Delphi interview questions. Describe how components are loaded from a DFM file at runtime. What is the difference between TGraphicControl and TWinControl? Write a function that reverses a string. If a component has another component as a property (example: TDatasource has a TDataset component as a property), what happens if the “pointed to“ component is deleted? Where does TCustomControl fit into the VCL heirarchy? What is the purpose
Read Answers (1) | Asked by : Ronald Vijay

Latest Answer : RTTI - Runtime type informartion, we can use is and as  key work we can use at runtime.  Using is we can find the control at run time Using as we can create control at run time ...
Read Answers (1) | Asked by : yogesh

Latest Answer : Components are commonly of two kindsVisual and Non-visualEx. VisualLabelsEdit boxesA visual component is one that helps make graphical building blocks.Ex. Non-visualTQueryTThread/Timer ...

Latest Answer : Define custom messageconst  WM_MY_MESSAGE = WM_USER + 0;Define handler for message  type  TMyForm = class(TForm)  private    procedure OnMyMessage(var Msg: TMessage); message WM_MY_MESSAGE;Send or Post message  ...

Latest Answer : DeclarationADynamicCharArray :  ^CharArrayType;AllocationADynamicCharArray := AllocMem(NumChars * sizeof(char)); ReleaseFreeMem(ADynamicCharArray, NumChars * sizeof(char)); ...

Latest Answer : To add a new code unit in Delphi choose File-New ... Unit.//**blank code unitunit Unit2;interface{interface code goes here}implementation{implementation code goes here}end. //this ends the unit ...

Latest Answer : Object Pascal ...

Latest Answer : File with .dpr extension is the project file. It comprises all the unit names used in the application along with their path in the hard disk (and the form name if the unit is associated with a .dfm file). It also instantiates the auto-create forms. We ...
Read Answers (1) | Asked by : Robert

Latest Answer : Hi Robert OnCalculate is event in Delphi it trigerrs when you are reading data from the database .NOTE : It trigerrs on reading each row Stupid Example :if you want to subtract two coolumns from database table then you override this event with ...
Read Answers (1) | Asked by : Robert

Latest Answer : Interface clause is used to represent the interface scetion in delphi. The interface contains the type declarations, var declarations. ...


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

JavaScript OnError Event

JavaScript OnError Event In this JavaScript tutorial you will learn about onerror event how to use onerror event along with syntax and example mosgoogle center Using onerror event The onerror event fires when a page has a script error This onerror event occurs in JavaScript when an image or document
 

JavaScript Event Handler

JavaScript Event Handler In this JavaScript tutorial you will learn about using event handlers along with events for each HTML tag mosgoogle center Using Event Handler in JavaScript Event Handlers are used in JavaScript by placing the name of the event handler inside the HTML tag associated with obj
 

SOA 2.0 Event Driven Architecture

SOA 2 0 Event Driven Architecture There has been much negative press in recent years in regards to Oracle’ s touting of SOA 2 0 as the next generation version of SOA Its combination of Event Driven Architecture with SOA considers the first iteration of SOA to be a mere client server drive
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape