Subject IBOQuery: How to create TField for selected fields at runtime?
Author Chuck Belanger
Hello:

I'm hoping this has an easy answer, for some reason I can't find it in
any documentation.

Using IBOQuery and IB_Query in my program. IBO because I'm using
Woll2Woll components. I'm doing some encryption of some of the fields in
some of the tables in my Firebird DB. Many of my queries are SQL.Add's
to a few query utilities, like qryAnyUse1, etc.

What I'd like to do is assign OnGetText events at runtime to the various
necessary fields to decrypt the field text.

I got some wonderful help from someone recently here on how to add
OnGet/SetText for the IB_query components, but how do I create a TField
at runtime, so that I can assign the OnGetText then?

It seems that the only way I can create a TField is to make the qry
persistent in a IBOquery component, then use the Objects treeview to Add
Fields via the menu. It seems reasonable that I should be able to do
this via the program, but how?

I tried variations of Sender.FieldByName('field name').OnGetText :=
<Name of Routine> but the program keeps sqwaking about the field isn't
found or something like that.

Thank you for any help,

Chuck Belanger