I have an infinite loop while freeing TOraSession object. How to get this:
// Class declaration - FOraProc has some Session property
// which is set in design time
FOraProc: TOraStoredProc;
code:
var
tempSession: ToraSession;
begin
tempSession := FOraProc.Session;
FOraProc.Session := anotherSession;
FOraProc.PrepareSQL;
FOraProc.ExecProc;
FOraProc.Session := tempSession;
end;
after that in TCustomDAConnection.ClearRefs on
while FSQLs.Count > 0 do
TCustomDASQL(FSQLs[0]).Connection := nil;
application go into infinite loop.
It is because FOraProc.FCommand is still registered on FSQLs list and cannot be removed because UsedConnection retrieve another TOraSession object (tempSession). So FOraProc.FCommand is removed from that FSQLs list.
I'm using ODAC 6.50.0.39 and Delphi 2007 Pro
best regards
Adam Siwon