Przeglądaj źródła

fcl-db: postgresql: correct message for unpreparation.
(note: if preparation of one statement failed and there are other already prepared statements (f.e. selects), then when Rollback used CloseDatasets is called which lead to Unpreparation of all datasets, which fails with : "current transaction is aborted, commands ignored until end of transaction block" ...)

git-svn-id: trunk@23140 -

lacak 12 lat temu
rodzic
commit
7566c9c685

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

@@ -117,6 +117,7 @@ ResourceString
   SErrFieldDefsFailed = 'Can not extract field information from query';
   SErrFetchFailed = 'Fetch of data failed';
   SErrPrepareFailed = 'Preparation of query failed.';
+  SErrUnPrepareFailed = 'Unpreparation of query failed.';
 
 const Oid_Bool     = 16;
       Oid_Bytea    = 17;
@@ -601,7 +602,7 @@ begin
       if not tr.ErrorOccured then
         begin
         res := PQexec(tr.PGConn,pchar('deallocate '+StmtName));
-        CheckResultError(res,nil,SErrPrepareFailed);
+        CheckResultError(res,nil,SErrUnPrepareFailed);
         PQclear(res);
         res:=nil;
         end;