Subject Re: [firebird-support] How to dynamically Delete A FDB
Author Milan Babuskov
niegil.thomas wrote:
> I tried to use IBO connection DropDatabase . I set the Database name the tried to run dropdatabase . So i got the error that connection not established.
> When i put connected:=True i get the message Table is in use.
> Can anyone tell me how to use IBConnection.DropDatabse. If possible with a example.

Not really a problem with Firebird, but...

In order to drop the database, you have to be connected to it and none
of the object should be in use. My guess is that you hooked up some
controls, so as soon as you connect some TQuery, TTable or whatever
controls you're using loads the data. I don't know, perhaps IBO itself
is holding some system tables open? Anyway, make sure you detached all
your DataSource components (or whatever they are called, I don't know
that much Delphi), and then drop the database.

Milan Babuskov