Subject Re: [IBO] Problem with IB_Session
Author Robert martin
Helen Borrie wrote:
> This is too terse to pinpoint the exact problem but 2 things I notice are:
> 1. The session is being created with no owner.
> 2. Destroying the session is the first thing the destructor
> does. What about the data access objects (connection, statements)
> ? The session has to be created before them and destroyed after
> them, otherwise they are left referring to a session that doesn't exist.
> Helen


Thanks for your quick response Helen. I have actually worked out the

The IB components need to be created and freed within the .Execute
method. Changing the code to work this way fixes the problem.

Re your comments about the session having no owner, I have never used an
owner for the session. Is it a requirement and what should I use there
if I am using it within a thread that will free itself and is created by
an object that will have been freed well before the thread completes?

Re 2 Believe it or not but was really all the non-commented code ! I do
create the session before all other components and free it after they
are freed, just all that was commented out in my example.

Rob Martin
Software Engineer

phone +64 03 377 0495
fax +64 03 377 0496

Wild Software Ltd