Subject Re: [firebird-support] Re: Database in use after disconnect and close
Author Norman Dunbar
Morning Wesly,

>> Did you commit?
> Yes. I trace my program, all transaction committed.
Good news.

>> Does your application definitely disconnect?
> Yes. I trace my program after database.connected := false.
Hmmm. Strange.

>>> How to "totally close the database" in run time ??
>>>> ...
> You mean that i need to shut down the database before running gfix to set read_only mode ?
Well, I replied to your question on how to "totally close the database".

> The database already confirmed was disconnected. why still need to shut down ?
Well, if you try and put the database in read-only mode while there are
any connections, you get the error you are seeing. Check out for full gory details
of putting a database into read-only mode and what you will see if there
are still connections.

It might help.

I rather suspect that while your app may have disconnected, if yo run in
from the Delphi IDE, as suggested by another poster, then a separate
connection *may* still exists from Delphi itself.

What happens if you use isql to login to the database as sysdba and
"show users"? If your sysdba session is the only connection you should
only see one occurrance of "# SYSDBA" in the output from the command.

Anything else may indicate where your "in use" problem is arising from.


Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767