Subject Re: [IBO] Need help with IB_Grid and IB_Query.Locate
Author Helen Borrie (TeamIBO)
At 08:29 PM 09-08-02 +0000, you wrote:
>I have an IB_Grid displaying a list of user records from a "View"
>query statement.
>When I add a new user record I need the IB_Grid to point to the
>newly posted record, so I do a IB_query.RefresshAll then a
>IB_Query.Locate UserID. IB_Query.Locate function however is taking
>too long. Is there a better method of doing this or speeding up this

Yep - from the help for TIB_RefreshAction:

The Refresh method keeps the whole row buffers in memory and refreshes the
list of keys that define the dataset. If a new row is added, it becomes a
member of the dataset through its key being fetched on refresh; or, if a
row is deleted, its key is excluded when the keys are refreshed. The
deleted row's whole record buffer would eventually be garbage-collected as
a result of its key being absent from the dataset.
The RefreshAction property determines how the refresh is to end up. It can
behave as though it were being opened the first time (raOpen) or, after it
is opened again it can go to the row number that it was on before the
refresh (raKeepRowNum). The third option is for it to go to the same row it
was positioned on before, by matching the Bookmark (raKeepDataPos).

BTW, don't call RefreshAll for a single insert. Refresh is sufficient.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at