Problem with TDAEDOAConnection.CreateCompatibleQuery

delphi

(Christen Blom Dahl) #1

There is an error in function TDAEDOAConnection.CreateCompatibleQuery. Currently the code of this function calls again OracleSession.LogOn this forces the connection to close the current session and login again into Oracle. This creates a problem for pending commits and some queries thad depend on current Oracle session like queries that ask for current sequence values.
The correct code for this function should be:

function TDAEDOAConnection.CreateCompatibleQuery: IDAServerDataset;
begin
  Result := inherited CreateCompatibleQuery;
end;

(EvgenyK) #2

better workaround will be

function TDAEDOAConnection.CreateCompatibleQuery: IDAServerDataset;
begin
  Result := inherited CreateCompatibleQuery;
  if not OracleSession.Connected then OracleSession.LogOn;
end;

(RemObjects) #3

Thanks, logged as bugs://81712


(RemObjects) #4

bugs://81712 got closed with status fixed.