Subject Refresh Current Record in TIBOQuery
Author sugi
Dear All,

In my TIBOQuery, I need to refresh the current (just inserted) record
because some triggers on the server side might change or override some
values. How do I do this ?

Btw, I found the following entry on the 'online FAQ' section :
...
How can I refresh a single record with TIBOQuery?

Call the InvalidateRowNum() method or the InvalidateBookmark() method to
do this. If I don't have it declared at the TIBODataset level you can
call it by referencing the InternalDataset property which gives you
direct access to the internal IB_Query instance that the TDataset layer
is on top of. You may need to call the TDataset.Resync() method in order
to get the datalink buffers to pick up the refreshed record as well.
...

I have two questions at this point :
1. The TIBOQuery does have one InvalidateRowNum(), but it needs a RowNum
integer parameter, but I don't see any RowNum property in the TIBOQuery.
How do I get this value? I'm guessing wildly here, but can I use
TIBOQuery1.InternalDataset.RowNum? (Untested yet, sorry).

2. The documentation of Resync() in Delphi (the IBO help file said that
this is just an override for the default TDataset method) said something
like the following :
...
Re-fetches the active record and the records that precede and follow it.
type TResyncMode = set of (rmExact, rmCenter);
procedure Resync(Mode: TResyncMode); virtual;
...
Description

Resync is used internally by other dataset methods to resynchronize the
dataset with underlying physical data when making calls that may change
the internal cursor position. Applications should use the Refresh method
instead of calling Resync.
<snip>
...
Note the last sentence; "should use Refresh instead of calling Resync".
But in this case TIBOQuery.Refresh() seems to refresh everything, not
just the current record. Can anyone clarify how I should do this
'properly' ?

Many thanks in advance,
sugi.