Subject Refresh question
Author Daniel Jimenez
Hi all,

My knowledge of IBObjects is practically null, and I am having to develop
applications which make use of it extensively. Thus, I am trying to use the
OO concept of reuse as often as possible, programmatically setting up the
different controls/components (IB_Connection, IB_transaction, IB_Query,
IB_Grid, IB_Cursors, IB_Edit etc) so that the same control/component such as
a IB_Query may be used by the application on different areas of the

I make sure that the application will never try to use the same
component/control for two different queries simultaneously.

My main problem is that when I setup the controls/components
programmatically, I on some occasions experience a different behaviour to
when I setup the controls/components up using the "design-time database
utilities". So I am obviously doing something wrong when setting up the
controls/components programmatically.

Taking out the obvious (such as trying to set a parameter before adding the
SQL to the IB_Query or IB_Cursor for example), is there any requirement to
setup properties in a particular order? For example FieldsVisible before
FieldsDisplayLabel? Or any other internal sequence that must be follows,
which is not obvious?

One of the multiple problems I am currently having, which I manly
experience when programmatically setting the properties of the
controls/components is as follows.

I am using a IB_Query to gather data and display it to users on a IB_Grid.
Since the PK is Auto Generated, I have a trigger defined in the DB (which
looks after the PK), and I (programmatically) set the GeneratorLinks
property so that the application has knowledge of the value for the PK

I also make use of the AfterAction event on the IB_UpdateBar. I check if the
post button was click, if true, I call Refresh() on the IB_Query. However, I
am obviously doing this the wrong way, since the next time the user adds a
record, the value of the Generator has been increased, not by one, but by

I have set the IB_Query property RequestLive to false, and the RefreshAction
to raKeepDataPos.

Thanks in advance for the help :-)


Comvision Pty. Ltd.