* Set PacketRecords to -1 if IndexFieldNames is set (bug ID 25387)

git-svn-id: trunk@30434 -
This commit is contained in:
michael 2015-04-05 09:59:29 +00:00
parent 7ad2f934f5
commit 844cf495f8
2 changed files with 11 additions and 2 deletions

View File

@ -860,8 +860,15 @@ end;
procedure TCustomBufDataset.SetPacketRecords(aValue : integer); procedure TCustomBufDataset.SetPacketRecords(aValue : integer);
begin begin
if (aValue = -1) or (aValue > 0) then FPacketRecords := aValue if (aValue = -1) or (aValue > 0) then
else DatabaseError(SInvPacketRecordsValue); begin
if (IndexFieldNames='') then
FPacketRecords := aValue
else if AValue<>-1 then
DatabaseError(SInvPacketRecordsValueFieldNames);
end
else
DatabaseError(SInvPacketRecordsValue);
end; end;
destructor TCustomBufDataset.Destroy; destructor TCustomBufDataset.Destroy;
@ -1895,6 +1902,7 @@ begin
BuildIndex(FIndexes[1]); BuildIndex(FIndexes[1]);
Resync([rmCenter]); Resync([rmCenter]);
end; end;
FPacketRecords:=-1;
FIndexDefs.Updated:=false; FIndexDefs.Updated:=false;
end end
else else

View File

@ -83,6 +83,7 @@ Resourcestring
SLookupInfoError = 'Lookup information for field ''%s'' is incomplete'; SLookupInfoError = 'Lookup information for field ''%s'' is incomplete';
SUnsupportedFieldType = 'Fieldtype %s is not supported'; SUnsupportedFieldType = 'Fieldtype %s is not supported';
SInvPacketRecordsValue = 'PacketRecords has to be larger then 0'; SInvPacketRecordsValue = 'PacketRecords has to be larger then 0';
SInvPacketRecordsValueFieldNames = 'PacketRecords must be -1 if IndexFieldNames is set';
SInvalidSearchFieldType = 'Searching in fields of type %s is not supported'; SInvalidSearchFieldType = 'Searching in fields of type %s is not supported';
SDatasetEmpty = 'The dataset is empty'; SDatasetEmpty = 'The dataset is empty';
SFieldIsNull = 'The field is null'; SFieldIsNull = 'The field is null';