Subject Re: [ib-support] Deadlock and wait
Author Woody
From: "Robert F. Tulloch" <tultalk@...>
Sent: Friday, July 27, 2001 11:56 AM
> I guess that creates more traffic but no more than refresh.
> So you use the nex/prev PK in your query? What if you delete a record?

Doesn't matter. By fetching the next/prev PK in a fresh transaction, it
knows what's there and what's not. (At least, it's supposed to :) Basically,
my procedure works like this:

I pass it the current PK and a value meaning [First rec, Last Rec, Next
Rec, Prec Rec, Direct Search]. If the operation doesn't find the needed
record, then it returns nil, otherwise it returns the PK. In most cases, I
use MIN and MAX to get the record immediately before/after the current one.
It doesn't create any more traffic than moving through a recordset one
record at a time. (At least initially, since each visited record would then
be stored locally) This method works very well for me even when filtering
records. Of course, it may be a lot tougher if you don't know what you are
filtering on at design time but all that is known in my program so I can
build it into the procedure. I pass it nil information if it doesn't need it
and the procedure then ignores it.