Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 21:43

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 03 Jun 2014, 03:44 
Offline

Joined: 10 Sep 2013, 15:50
Posts: 14
line 3598-3984: if the table has an available index, the FindRec try to find the record by index, if it can't find the record, it will use the row by row search algorithm -- it is unnecessary, just waste time! if you cann't find it by index, you cann't find it by row-by-row compare too.


if (MTIndex <> nil) and MTIndex.FindRecordIndexByKey(KeyValues, RecIndex) then
Result := FRecordsView.IndexOf(FRecordsView.MemTableData.RecordsList[RecIndex])
else
begin
FieldNo := TField(Fields.First).FieldNo-1;
...//omited
end;

it shoult like this:

if (MTIndex <> nil) then
begin
if MTIndex.FindRecordIndexByKey(KeyValues, RecIndex) then
Result := FRecordsView.IndexOf(FRecordsView.MemTableData.RecordsList[RecIndex]);
end

else
begin
FieldNo := TField(Fields.First).FieldNo-1;
...//omited
end;


Top
 Profile  
 
PostPosted: 22 Jun 2014, 13:35 
Offline

Joined: 10 Sep 2013, 15:50
Posts: 14
pls see the document for detail


Attachments:
TCustomMemTableEh.FindRec.zip [15.35 KiB]
Downloaded 183 times
Top
 Profile  
 
PostPosted: 31 Jul 2014, 14:21 
Offline

Joined: 10 Sep 2013, 15:50
Posts: 14
please close this issue--i found the bug had fixed in 181


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 83 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group