I have a lib with some TDataModules who share a TADOConnection. I create and delete datamodules in some applications.
When I delete a datamodule, I get an EAccessViolation error. I think this is due to the fact that the datamodule wants to delete the TADOConnection, which is shared.
I tried setting the tdatamodule->tbquery->Connection property to NULL when the destructor is called, without any luck.
Why do I think the error resides in TADOConnection? Because when I build my application without a lib, I can create and delete datamodules without any problems. And when I create a lib with datamodules who have their own connection, I have no problems either.
Any help? Thanks in advance!
The error: http://oi60.tinypic.com/noyc6x.jpg
The call stack: http://oi61.tinypic.com/sgljx5.jpg
The solution is adding
borlndmm.dll
to the project folder of the application using the libraries or dll's.From the dll/lib projects in Borland C++ Builder: