TOracleSession compatibility v.3.4.4 vs v.3.4.6.1

rguillen

Member²
I have a host application with DOA v3.4.6.1
and one dll with DOA v3.4.4

when I call the dll library on my procedure I receive an access violation on line code
HostSession.Share(FRepAlmacen55.OraSession);

next is the complete code:

//export procedure
procedure ShowRptAlmacen55(HostHandle: THandle; HostSession: TOracleSession; pSQL: PChar; pPreview: Boolean); stdcall;

//implementation procedure
procedure ShowRptAlmacen55(HostHandle: THandle; HostSession: TOracleSession; pSQL: PChar; pPreview: Boolean);
begin
try
FRepAlmacen55:= TFRepAlmacen55.Create(nil);
try
HostSession.Share(FRepAlmacen55.OraSession); //Access violation on this line
FRepAlmacen55.GeneralQ.Open;
If pPreview Then FRepAlmacen55.rptAlmacen55.DeviceType:= dtScreen
Else
FRepAlmacen55.rptAlmacen55.DeviceType:= dtPrinter;
FRepAlmacen55.rptAlmacen55.PrintReport;
finally
FRepAlmacen55.GeneralQ.CloseAll;
FRepAlmacen55.OraSession.LogOff;
FRepAlmacen55.Free;
end;
except
On E:Exception do ShowMessage(E.Message);
end;
end;

Do you know if there is a problem with the different versions of DOA or what can be my problem?
 
Are you using Net 8 or 9? If so, can you try to assign the ExtnalSVC property instead of calling Share and verify if this fixes the problem?

------------------
Marco Kalter
Allround Automations
 
Back
Top