Board index » cppbuilder » Add dynamic a new calculate field to a TQuery

Add dynamic a new calculate field to a TQuery

Hi
Is it possible to add a new field to TQuery after a SQL select command have
been executed. And use the OnCalcField event to calculate new data from the
reply data.

Thank!
Peter Ekstr?m

 

Re:Add dynamic a new calculate field to a TQuery


You can define the persistent field defs at run time and then in addition,
add a calculated field before calling Open();

Another simple thing you can do is use the ->OnGetText() event to define the
data you want displayed for a field. During this event you can do
calculations too.

Kevin Berry

Quote
"Peter Ekstr?m" <peter.ekst...@chello.se> wrote in message

news:3d71126f@newsgroups.borland.com...
Quote
> Hi
> Is it possible to add a new field to TQuery after a SQL select command
have
> been executed. And use the OnCalcField event to calculate new data from
the
> reply data.

> Thank!
> Peter Ekstr?m

Other Threads