mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
* Set PacketRecords to -1 if IndexFieldNames is set (bug ID 25387)
git-svn-id: trunk@30434 -
This commit is contained in:
parent
7ad2f934f5
commit
844cf495f8
@ -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
|
||||||
|
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user