Subject Re: File in use
Author kmesiab
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 12:27 AM 12/02/2005 +0000, you wrote:
>
>
>
> >I'm trying to create a database then a table then insert a few
rows
> >into the new table.
> >
> >All of that works, but if I try to delete the database file
> >afterwards, the file is in use by another process, how should I
> >effectively close out all activity so that the file can be
deleted?
> >
> >Here is my process:
> >
> >Create database
> >Create connection
> >Create transaction
> >Create command
> >Run SQL
> >Commit transaction
> >Close connection
> >Dispose transaction
> >Dispose command
> >Dispose connection
>
> Firebird database isn't a series of file-driven objects, it's one
logical
> file that is the campus of the server. The API doesn't physically
touch
> the database file at all - it acts as a bearer of requests.
Applications
> issue SQL commands to request the server to do things for you.
>
> The proper way to delete a database is to connect to it and then
issue a
> DROP DATABASE command. You have to be SYSDBA or the database
owner for
> this to succeed. Then, the server will do the necessary
filesystem
> operations to delete the file.
>
> If you must, you can filesystem-delete the database once the
server has
> been shut down and the client library is no longer loaded in
server memory.
>
> ./heLen


That makes sense. How does this logic apply to the embedded
version? I should have specified in my first post that I was using
the firebird embedded database.

In specific, I'm using the ADO.Net provider and the fbembed.dll.
It is also worth noting that I've tried to use the
FbConnection.DropDatabase() method by issuing the same list of
parameters that I used to create the database and I receive the
following message:

"lock-timeout on wait transaction"

Thanks for your replies.

-Kevin Mesiab