Subject Re: [IBO] Refreshing Data
Author Paul Schmidt

On 10 Mar 2001, at 11:41, Geoff Worboys wrote:

To: <>
Organization: Telesis Computing
From: "Geoff Worboys" <geoff@...>
Date sent: Sat, 10 Mar 2001 11:41:00 +1100
Send reply to:
Subject: Re: [IBO] Refreshing Data

> > Now the problem, when you go back to the country form, it's
> > TIBOTable doesn't know that you entered a new country. You
> > can call the Refresh function which will reload it, but if
> > you had something other then currencies where there might
> > be hundreds or thousands of rows, this could take some time.
> > So, is there a way of causing it to refresh, only if it
> > has changed?
> You've already had a response describing the use of events. But I
> have a couple of other comments...
> Dont use TIBOTable, use TIBOQuery - especially for lookups. So that
> you can control the SQL and only select those fields that are actually
> required - making a refresh significantly faster.

Hmmm, the application, which was about 90% complete, is a conversion
from Paradox so it uses TTable in a lot of places, that is a good
idea with TIBOQuery, though.

> The last time I used lookups with standard VCL controls (a very long
> time ago) it was impractically slow on large datasets. If you really
> think that you may need to perform lookups on large datasets you may
> want to consider using the native components so that you can have more
> control over how the lookup works.

I probably will move closer to the native components in future
versions, but the app is already 4 months behind schedule so the
faster I can get it done the better. However I don't want it too
slow either.

> For internal notification of changes, I prefer an internal mechanism
> rather that IB events. If you are providing a way of opening a form
> to create a missing lookup element, then you should also provide a
> feedback mechanism. Perhaps an AfterCommit handler on the form
> transaction that broadcasts a message to other forms.

Since it's an MDI app, I would need to know which forms are currently
active, they are created entirely on the stack, suppose D3 keeps a
list of pointers to active forms,. but I haven't figured out if this
is publically accessable and how to access it. I was thinking of
keeping an array of booleans one element for each dataset that needs
refreshing, and then set them as needed. The the form would do the
refreshing in the Activate event. The form that updates the item,
could then set the proper elements in the AfterCommit or AfterPost

Thanks for the info....


Paul Schmidt,
Tricat Technologies
Email: paul@...