Browse Source

* Fix prepare without parameters

git-svn-id: trunk@43003 -
michael 5 years ago
parent
commit
f4921daee6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-db/src/sqldb/postgres/pqconnection.pp

+ 3 - 1
packages/fcl-db/src/sqldb/postgres/pqconnection.pp

@@ -947,8 +947,10 @@ begin
         end;
         end;
       FPrepared := True;
       FPrepared := True;
       end
       end
+    else if Assigned(AParams) then
+      Statement := AParams.ParseSQL(buf,false,sqEscapeSlash in ConnOptions, sqEscapeRepeat in ConnOptions,psPostgreSQL)
     else
     else
-      Statement := AParams.ParseSQL(buf,false,sqEscapeSlash in ConnOptions, sqEscapeRepeat in ConnOptions,psPostgreSQL);
+      Statement:=Buf;
     end;
     end;
 end;
 end;