Browse Source

* Only put unbound params in the list of fieldnames (bug ID 25955)

git-svn-id: trunk@27482 -
michael 11 years ago
parent
commit
9e93e4293b
1 changed files with 12 additions and 6 deletions
  1. 12 6
      packages/fcl-db/src/base/datasource.inc

+ 12 - 6
packages/fcl-db/src/base/datasource.inc

@@ -463,6 +463,8 @@ Var
   DS : TDataset;
   DS : TDataset;
   F  : TField;
   F  : TField;
   I : Integer;
   I : Integer;
+  P : TParam;
+
 
 
 begin
 begin
   FN:='';
   FN:='';
@@ -472,13 +474,17 @@ begin
     F:=Nil;
     F:=Nil;
     For I:=0 to FParams.Count-1 do
     For I:=0 to FParams.Count-1 do
       begin
       begin
-      If Assigned(DS) then
-        F:=DS.FindField(FParams[i].Name);
-      If (Not Assigned(DS)) or (not DS.Active) or (F<>Nil) then
+      P:=FParams[i];
+      if not P.Bound then
         begin
         begin
-        If (FN<>'') then
-          FN:=FN+';';
-        FN:=FN+FParams[i].Name; 
+        If Assigned(DS) then
+          F:=DS.FindField(P.Name);
+        If (Not Assigned(DS)) or (not DS.Active) or (F<>Nil) then
+          begin
+          If (FN<>'') then
+            FN:=FN+';';
+          FN:=FN+P.Name;
+          end;
         end;
         end;
       end;
       end;
     end;
     end;