mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 15:46:00 +02:00
* Allow a size of 0 in a stringfield
git-svn-id: trunk@8914 -
This commit is contained in:
parent
8a66698bc4
commit
41e1da6fb7
@ -956,7 +956,10 @@ end;
|
|||||||
class procedure TStringField.CheckTypeSize(AValue: Longint);
|
class procedure TStringField.CheckTypeSize(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If (AValue<1) or (AValue>dsMaxStringSize) Then
|
// A size of 0 is allowed, since for example Firebird allows
|
||||||
|
// a query like: 'select '' as fieldname from table' which
|
||||||
|
// results in a string with size 0.
|
||||||
|
If (AValue<0) or (AValue>dsMaxStringSize) Then
|
||||||
databaseErrorFmt(SInvalidFieldSize,[AValue])
|
databaseErrorFmt(SInvalidFieldSize,[AValue])
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user