Subject Re: Database in use after disconnect and close
Author hhtan37
My application will be run from CD and using firebird embedded version 2.5. The application has be configure to run just a single instance at any of time.

I try to run the application not under the Delphi IDE, but prompted with the same error message. While the application remain running, i use IBExpert to check the connection of the database, it show just 1 connection to the database. And for testing purposes, when I run the application without creating the database, I managed to run gfix command successfully within the apps.

I suspect the apps still hold the handle of the database even though it disconnected.


--- In firebird-support@yahoogroups.com, Norman Dunbar <Norman@...> wrote:
>
> 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
> http://www.firebirdsql.org/manual/gfix-dbmode.html 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.
>
>
>
> Cheers,
> Norman.
>
> --
> Norman Dunbar
> Dunbar IT Consultants Ltd
>
> Registered address:
> Thorpe House
> 61 Richardshaw Lane
> Pudsey
> West Yorkshire
> United Kingdom
> LS28 7EL
>
> Company Number: 05132767
>