소스 검색

* Allow a size of 0 in a stringfield

git-svn-id: trunk@8914 -
joost 18 년 전
부모
커밋
41e1da6fb7
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      packages/fcl-db/src/fields.inc

+ 4 - 1
packages/fcl-db/src/fields.inc

@@ -956,7 +956,10 @@ end;
 class procedure TStringField.CheckTypeSize(AValue: Longint);
 
 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])
 end;