tobenschain 0 Posted September 20, 2023 I can't understand why this doesn't work Using FireDAC with SQLite and TFDTable, this returns RecNo of -1 findkeyw := '8F'; ABudSys_DB.IndexFieldNames := 'key'; ABudSys_DB.IndexName := 'KeyIdx'; ABudSys_DB.FindNearest([findkeyw]); This also returns RecNo of -1 findkeyw := '8F30'; ABudSys_DB.IndexFieldNames := 'key'; ABudSys_DB.IndexName := 'KeyIdx'; if ABudSys_DB.FindKey([findkeyw]) then File has for index 8A43 8F30 8F31 Share this post Link to post
tobenschain 0 Posted September 20, 2023 BudSys_DB.Params.RecordCountMode := cmTotal; doesn't help Share this post Link to post
Uwe Raabe 2057 Posted September 20, 2023 Can you list the following settings for the TFDTable instance: CachedUpdates FetchOptions.Unidirectional FetchOptions.CursorKind FetchOptions.LiveWindowParanoic Also, is KeyIdx a primary or unique key? Share this post Link to post
tobenschain 0 Posted September 20, 2023 CachedUpdates false FetchOptions.Unidirectional false FetchOptions.CursorKind ckAutomatic FetchOptions.LiveWindowParanoic false Share this post Link to post
tobenschain 0 Posted September 21, 2023 KeyIdx is primary and unique other settings: Share this post Link to post
Uwe Raabe 2057 Posted September 21, 2023 Try setting FetchOptions.LiveWindowParanoic to True. Share this post Link to post