Subject | Re: [IBO] Performance improvements when refreshing a dataset |
---|---|
Author | Markus Ostenried |
Post date | 2015-02-16T21:37:31Z |
On Mon, Feb 16, 2015 at 10:18 PM, Robert Martin rob@... [IBObjects] <IBObjects@yahoogroups.com> wrote:Hi
I have a query where sometimes I need to refresh the selected record (A)
and other times where I know and item has been added (by another
process) and I need to refresh and select this item (B).
Historically I have simply done the following (depending on the situation)
(A) Query.Refresh
(B) Query.Refresh followed by Query.Locate()
I have replaced (A) with the following
(A) Query.InvalidateRowNum(Query.InternalDataset.RowNum)
This is massively quicker on large datasets.
I would like to speed up (B) if possible, but am not sure how to go
about this. I don't need to refresh all the other records, I just need
to add the new record into the dataset and move to it. My code knows
the Primary key field value of the newly added record. I am using IBOQuery.
Any suggestions ?
Thanks
Rob