Subject | RE: [IBO] TIBOQuery - Refresh only the current record |
---|---|
Author | Enrico Raviglione |
Post date | 2005-07-25T16:42:49Z |
Thanks Helen,
with only this 3 lines all work perfectly:
with only this 3 lines all work perfectly:
>Enrico.
> long int aRowNum = myQuery->InternalDataset->RowNum;
> myQuery->InvalidateRowNum(aRowNum);
> myQuery->RefreshRows;
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of Helen Borrie
> Sent: Saturday, July 23, 2005 12:33 AM
> To: 'IBObjects@yahoogroups.com'
> Subject: Re: [IBO] TIBOQuery - Refresh only the current record
>
>
> At 06:26 PM 22/07/2005 +0200, you wrote:
> >Hi,
> >
> >i try to refresh only the current record of a TIBOQuery with this
> >instructions:
> >
> >long int aRowNum = myQuery->InternalDataset->RowNum;
> >myQuery->InternalDataset->InvalidateRowNum(aRowNum);
> >
> >But current row are not refreshed. aRowNum don't seem to
> have the right
> >number, it's value are 0 or 1 and not the exact RowNum.
> >
> >Where are the problem ?
> >
> >In this application the "current record" are the record with
> focus into
> >a wwDbGrid (InfoPower DBGrid).
>
> Two possibilities:
>
> 1) Use the InvalidateRowNum of the iboquery, i.e.
>
> long int aRowNum = myQuery->InternalDataset->RowNum;
> myQuery->InvalidateRowNum(aRowNum);
> myQuery->RefreshRows;
>
> and/or
>
> 2) the Infopower grid might not know how to respond to
> InvalidateRowNum,
> due to the TDatalink not knowing about it.
>
> 3) it might be overkill but, if RefreshRows doesn't cause the
> buffer to
> update the control, you might have to do some ugly thing to force the
> datasource to take a fresh look at that that row, e.g. call Locate to
> "locate" the current row. (There is probably a less ugly way
> - that's just
> one suggestion!)
>
> Helen
>
>
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other
> layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>
>
>
>
>