瀏覽代碼

* Fix prepare without parameters

git-svn-id: trunk@43003 -
michael 5 年之前
父節點
當前提交
f4921daee6
共有 1 個文件被更改,包括 3 次插入1 次删除
  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;
       FPrepared := True;
       end
+    else if Assigned(AParams) then
+      Statement := AParams.ParseSQL(buf,false,sqEscapeSlash in ConnOptions, sqEscapeRepeat in ConnOptions,psPostgreSQL)
     else
-      Statement := AParams.ParseSQL(buf,false,sqEscapeSlash in ConnOptions, sqEscapeRepeat in ConnOptions,psPostgreSQL);
+      Statement:=Buf;
     end;
 end;