I take it you are not just trying to delete the records with
delete from
or
truncate tablename
You will need to detach the database from the DBMS then delete the file.
This will require you to have SA rights
You may have to close each of the connections, except your own
Close your own connections
Detach the DB from the DBMS
Delete the file.
those are the basic steps
Wade
"Mahesh D. Rane" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,
How to forcefully delete sql database even if the
connection to that database is open. I want some query or
code in C#.
Regards,
Mahesh