confidentia
Member
We would like to share Oracle connection handle between Direct Oracle Access (DOA) component TOracleSession and FireDAC TFDConnection component. We tried several ways but it seems that FireDAC uses it own custom complex "handle" format (see FireDAC.Phys.Oracle.pas):
function TFDPhysOracleConnection.InternalGetCliHandle: Pointer;
begin
if FEnv nil then begin
FCliHandles[0] := FEnv.Handle;
FCliHandles[1] := FService.Handle;
FCliHandles[2] := FServer.Handle;
FCliHandles[3] := FSession.Handle;
FCliHandles[4] := TFDPhysOracleTransaction(TransactionObj).FTransaction.Handle;
FCliHandles[5] := FEnv.Error.Handle;
FCliHandles[6] := pOCIHandle(PChar(FEnv.CharsetName));
FCliHandles[7] := pOCIHandle(FEnv.ExplicitCharsetID);
FCliHandles[8] := pOCIHandle(FEnv.ByteSemantic);
Result := @FCliHandles;
end
else
Result := nil;
end;
How can we get all these parts from DOA TOracleSession component? Or maybe we can take some handles from FireDAC TFDConnection and set them in DOA TOracleSession?
function TFDPhysOracleConnection.InternalGetCliHandle: Pointer;
begin
if FEnv nil then begin
FCliHandles[0] := FEnv.Handle;
FCliHandles[1] := FService.Handle;
FCliHandles[2] := FServer.Handle;
FCliHandles[3] := FSession.Handle;
FCliHandles[4] := TFDPhysOracleTransaction(TransactionObj).FTransaction.Handle;
FCliHandles[5] := FEnv.Error.Handle;
FCliHandles[6] := pOCIHandle(PChar(FEnv.CharsetName));
FCliHandles[7] := pOCIHandle(FEnv.ExplicitCharsetID);
FCliHandles[8] := pOCIHandle(FEnv.ByteSemantic);
Result := @FCliHandles;
end
else
Result := nil;
end;
How can we get all these parts from DOA TOracleSession component? Or maybe we can take some handles from FireDAC TFDConnection and set them in DOA TOracleSession?