"At end of Table"

I am Developing in Delphi &  I use Paradox as my backend. I am using
setrange in a Table say Table1 (with Cached updates is True )& then making
some changes there  I'm changing the values of setrange. Before this
changing I'm calling cancelrange. at this stage without any modification if
I try to call Applyupdates its reporting "At end of Table." & also
Applyupdate is failing. Before calling ApplyUpdates the record was posted
already. also at this stage if I want to call cancelrange then also it is
reporting error - "At end of Table". Maximum time its happening if the
record is last one (based on Primary Key).
Any solution?

TIA
Papiya