Subject | Re: Exiting gracefully from lost connection error (335544721) |
---|---|
Author | almfgingras |
Post date | 2005-10-17T18:57:46Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...>
wrote:
transaction component instead of the database component itself.
However, I am not sure if it is a good idea to nullify any component
that has not yet been freed for fear to create an access violation
when its owner tries to free it at a later time.
I tried to explicitely free the database and transaction components
in various orders without success (i.e. I get some access violations
each time).
For the time being, I think I will stick with Terry's suggestion to
use ExitProcess(0) instead of Application.Terminate, which seems to
very well address the problem to a certain degree.
Many thanks again for taking the time to suggest some possible
solutions to this problem.
Philippe
wrote:
>components.
> I have never seen that behaviour with database connection
> I have seen it when using a TObjectList derivative of visualis
> components when OwnsObjects is true but the owner of the component
> the form etc (until I woke up and realised there is aTComponentlist
> for that task).free.
>
> I wonder what the database component is trying to do when it is
> The only thing I can think of is if it is sending a rollback orYou may be right Adam, the problem may very well come from the
> something to any attached transaction. Does it help maybe to assign
> the transaction to null before closing, or maybe to explicitly free
> both objects in a specified order in the ondestroy event? Then you
> should not have the objects attempting to access an object that has
> previously been freed.
>
> Adam
>
transaction component instead of the database component itself.
However, I am not sure if it is a good idea to nullify any component
that has not yet been freed for fear to create an access violation
when its owner tries to free it at a later time.
I tried to explicitely free the database and transaction components
in various orders without success (i.e. I get some access violations
each time).
For the time being, I think I will stick with Terry's suggestion to
use ExitProcess(0) instead of Application.Terminate, which seems to
very well address the problem to a certain degree.
Many thanks again for taking the time to suggest some possible
solutions to this problem.
Philippe