DLL usage : Oracle session destroyed after FreeLibrary

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
JeanR
Posts: 22
Joined: Fri 20 Jul 2007 17:54

DLL usage : Oracle session destroyed after FreeLibrary

Post by JeanR » Tue 29 Jan 2008 13:01

Hello,

I have a lot of part of our application who use (internal build) dll's, these dll use the Oracle Session created and connected by the parent application (Pointer to the oraclesession send in the exported functions of the dll.
all is working fine, but when i finish to use the dll, after the FreeLibrary, the OracleSession of my Parent application is un-usable, and even if i release it and recreate a new oracle session, i'v got access violation...

- is it a problem in the Finalize of some odac units who free some arrays or something like that ?
- do you have idea how to solve my problem ?

many thanks !

edit:
i have check in a old source of odac 6.0, and we have this in ora.pas

Code: Select all

finalization
  if Sessions  nil then begin
    DisconnectSessions;
    Sessions.Free;
    Sessions := nil;
  end;
i think this is my problem ^^
Unfortunately, we use the no-source version...

JeanR
Posts: 22
Joined: Fri 20 Jul 2007 17:54

Post by JeanR » Tue 29 Jan 2008 15:29

Hi again,

i think that my problem is solved :

i' have forget to add some bpls to the list of used packets, with dac70.bpl,dacvcl70.bpl,odac70.bpl & odacvcl70.bpl, this is better.

Jean.R

Post Reply