Re: [IBO] How to refresh only one row, before to fetch it?
Author
Dmitry Beloshistov
Post date
2001-08-02T14:38:26Z
----- Original Message -----
From: <hugosan@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, August 02, 2001 5:21 PM
Subject: [IBO] How to refresh only one row, before to fetch it?
> [C++Builder 5, IBO 3.6Cf, IB 6.01]
> Let's suppose a MultiUser Sales System, where the master table
> ARTICLES(products) (with a TIB_Query) is opened when the application
> starts.
> I want to guarantee my users that, when they call one record, they
> will see the latest "Quantity_Available" (of course, without keeping
> in mind those transactions not commited yet).
> To get this, I understand that I must "refresh" the TIB_Query->Row
> requested, by forcing a re-fetching. I know the method
> InvalidateRowNum does this, but how can I call that method BEFORE the
> users requests the record, to show it refreshed.
> It's to say: when my applications knows which record the user wants,
> the TIB_Query is already positioned at this RowNum, and the other
> fields are already showed.
> It seems as InvalidateRowNum worked mainly to guarantee that the NEXT
> TIME you read that record, it will be refreshed...
> Maybe I don't guess right with the exact point where to call this
> method, or maybe there is another way to get this behaviour.
> Please give me a light. I hope my "computerized" english allow to be
> understood.
> Hugo.
One of ways is : use TIB_Query.BeforeXXXX & TIB_Query.AfterXXXX,
TIB_Query.OnRowSelectedChange & TIB_Query.OnRowSelectedChanged...
May be this events help you - I`am don`t sure...