Subject RE: [IBO] Cursor Unknown Fix
Author Alan McDonald
> >2. Where I need to have an action which deletes a record
> currently in view
> >via another connection and transaction. When I try to refresh the current
> >view, I understandably get unknown cursor since the grid is
> trying to fetch
> >a row which now no longer exists. Easy fixed by forcing a Close
> and Open on
> >the Query.
>
> In fact, a Refresh of an IB_Query or IBOQuery is a Close and
> Open. However, where you might get this error on a since-deleted row is
> where the RefreshAction is raKeepDataPos, if the deleted row
> happens to be
> in your buffer, you have PessimisticLocking True and you request to edit
> the deleted row. What could help is to use BufferSynchroFlags - at least
> [bsBeforeEdit].
>

Yes - I use raKeepDataPos quite a lot. But my lookups are raKeepRowNum -
which is the recommended setting for lookup queries.
I don't request to edit the deleted row but Close/Open the query is working
whereas Transaction.Refresh was causing the exception.

Alan