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

View File

@ -83,6 +83,7 @@ Resourcestring
SLookupInfoError = 'Lookup information for field ''%s'' is incomplete';
SUnsupportedFieldType = 'Fieldtype %s is not supported';
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';
SDatasetEmpty = 'The dataset is empty';
SFieldIsNull = 'The field is null';