Board index » delphi » FindKey doesn't works with CachedUpdates

FindKey doesn't works with CachedUpdates

Hi!

I am using Delphi2. When CachedUpdates is True, TTable.FindKey always
returns False even if the record exists. However, TTable.Locate works
fine. FindKey only works when CachedUpdates is False. The table is a
local Paradox table.

Why? Is it a bug in Delphi?

I was developing my project using FindKey without CachedUpdates. But now
(when it is about 75%), CachedUpdates is needed. I cannot change my
whole lot of code searching and replacing FindKey to Locate.

Sujit Singhania

 

Re:FindKey doesn't works with CachedUpdates


Quote
>I am using Delphi2. When CachedUpdates is True, TTable.FindKey always
>returns False even if the record exists. However, TTable.Locate works
>fine

From the Delphi help file -  Findkey Method: Caution For Using:

"While these methods are documented here to allow you to work with legacy applications, you should always use Lookup and Locate in your new applications. Moreover, you may see performance gains in existing applications if you convert them to use the new method."

I generaly use Locate...

==
Bill

Other Threads