瀏覽代碼

* Make sure output contains something in case of empty dataset

git-svn-id: trunk@42266 -
michael 6 年之前
父節點
當前提交
01e5861255
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      packages/fcl-web/src/restbridge/sqldbrestdata.pp

+ 7 - 2
packages/fcl-web/src/restbridge/sqldbrestdata.pp

@@ -699,8 +699,13 @@ begin
       end;
       end;
     if not (D.EOF and D.BOF) then
     if not (D.EOF and D.BOF) then
       StreamDataset(IO.RESTOutput,D,FieldList)
       StreamDataset(IO.RESTOutput,D,FieldList)
-    else if Single then
-      DoNotFound;
+    else
+      begin
+      if Single then
+        DoNotFound
+      else
+        StreamDataset(IO.RESTOutput,D,FieldList)
+      end;
   finally
   finally
     D.Free;
     D.Free;
   end;
   end;