mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 18:10:17 +02:00
TCustomBufDataset: don't allow PacketRecords=-1 on a UniDirectional dataset. Issue #36884
git-svn-id: trunk@44634 -
This commit is contained in:
parent
e08d8bba82
commit
3f5f91f194
@ -998,10 +998,13 @@ procedure TCustomBufDataset.SetPacketRecords(aValue : integer);
|
||||
begin
|
||||
if (aValue = -1) or (aValue > 0) then
|
||||
begin
|
||||
if (IndexFieldNames='') then
|
||||
if (IndexFieldNames<>'') and (aValue<>-1) then
|
||||
DatabaseError(SInvPacketRecordsValueFieldNames)
|
||||
else
|
||||
if UniDirectional and (aValue=-1) then
|
||||
DatabaseError(SInvPacketRecordsValueUniDirectional)
|
||||
else
|
||||
FPacketRecords := aValue
|
||||
else if AValue<>-1 then
|
||||
DatabaseError(SInvPacketRecordsValueFieldNames);
|
||||
end
|
||||
else
|
||||
DatabaseError(SInvPacketRecordsValue);
|
||||
|
@ -85,6 +85,7 @@ Resourcestring
|
||||
SUnsupportedFieldType = 'Fieldtype %s is not supported';
|
||||
SInvPacketRecordsValue = 'PacketRecords has to be larger then 0';
|
||||
SInvPacketRecordsValueFieldNames = 'PacketRecords must be -1 if IndexFieldNames is set';
|
||||
SInvPacketRecordsValueUniDirectional = 'PacketRecords must not be -1 on an unidirectional dataset';
|
||||
SInvalidSearchFieldType = 'Searching in fields of type %s is not supported';
|
||||
SDatasetEmpty = 'The dataset is empty';
|
||||
SFieldIsNull = 'The field is null';
|
||||
|
Loading…
Reference in New Issue
Block a user