I want to drop a database. I have used the following code, but to no avail.
public void DropDataBase(string DBName,SqlConnection scon) { try {
Someone connected to the database. Try to switch to another database and then, to drop it:
Try
SP_WHO to see who connected
SP_WHO
and KILL if needed
KILL