BUG: BeforeDisconnect is called after object is disposed?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FrenkR
Posts: 6
Joined: Tue 06 Jul 2010 23:09

BUG: BeforeDisconnect is called after object is disposed?

Post by FrenkR » Tue 10 Apr 2012 12:19

Another bug(latest version).
I have *BeforeDisconnect* evet assigned as:

if _Conn.InTransaction then
_Conn.Rollback;

_Conn is placed on TDataModule(named Dm).

If I have _Conn open and I call Dm.Free, I get an access violation(read of address 00000000 -> pointer to disposed object). If I call _Conn.Close() before object is disposed, then a call to event is ok.

Rgds,
Frenk

AndreyZ

Post by AndreyZ » Tue 10 Apr 2012 14:40

Hello,

Thank you for the information. We have reproduced and fixed this problem. This fix will be included in the next SDAC build.

Post Reply