Subject RE: [IBO] Cursor unknown error -504
Author Alan McDonald
> Thanks Helen.
>
> The problem seems to happen when you return to the application after
> switching to another task or if the application has been idle for a
> period of time. The error message is sitting there when the screen
> appears. And it happens on stand alone machines as well as when
> using a server. I have never seen it happen when actively using the
> application.
>
> The app has a timer that refreshes the data displayed in a grid
> every minute in case someone adds a new record but this doesn't seem
> to be the cause. I put a try - except around the refresh but it
> doesn't trap the error.
>
> If I knew what the error message means it might point me in the
> right direction.
>
> Regards
>
> Bob

I've been plagued with this error for coming on 2 years now. I too use the
refresh method to save on a timer.
dmLocalStore.IB_Connection1.DefaultTransaction.Refresh(true);
It's set at 5 minute intervals by default (noone changes it)
There's a save button also linked to this call.
I've been unable to find exactly what IBO finally throws this exception.
The nearest I have come to fixing it is making sure that all my queries have
the PK ONLY in the KeyLinks property. I went thru all my queries (absolutely
religiously all of them - there's a lot of them) and I thought I had fixed
it, but I still get it occasionally. I did find a couple which had the PK
but also another field in the KeyLinks - not sure what I was thinking when I
put the other field in there.
Anyway, I've raised the issue here several times only to be told it must be
in the KeyLinks. Maybe you could religiously check all your Keylinks too to
make sure that every query has the ability to unambiguously get back the
current record after the refresh. This includes any Selectable SPs.

Alan