Subject Re: Cannot DROP TABLE due to resource being in use, how to close resource?
Author Bhavbhuti Nathwani
Hi Helen

Thanks for responding to my post.

--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
> I don't think you read everything that Uwe wrote:
> > After your current use of the jobid you can delete all records
with this
> > jobid.
>
> In other words, you will have an empty (or nearly empty) table most
of the time. In fact, what many of us do, as part of periodic
housekeeping when users are excluded, is run a script on our
"permanent temporary" tables to delete and recreate them. That way,
we avoid building up too much garbages.

In fact I did, but that raised questions in my mind of garbage
collection. Your explanation of periodic deletion and recreation of
perma-temp tables is what I will be aiming for.


> In reply to your other question, don't confuse the DB_KEY with a
primary key...

OK


> What Uwe is talking about is simply adding a field to the "permanent
temporary table" that identifies all the records as belonging to one
"job"...

OK


> Don't mess around with trying to create and drop tables as part of a
user process. You will get tied up in knots.

:) I won't I will work on your and Uwe's suggestions


> Global temporary tables are implemented in Firebird 2.1. You might
care to download the Beta 2 kit and have a play with them. They are
very cool. :-)

Yes, I was told, but it being Beta (more stable than many production
apps, I am sure) I was not wanting to try it on my dev-cum-prod machine.

Will it address my concern in this thread? If it does so then I don't
mind pushing FB Beta to the client if it eases perma-temp table problem.

Please advise.

Thanks.