Hi everybody,
I am using VB Webforms as my front end and MSDE 2000 as my back end. I am not able to drop a database after executing the following vb code on that database:
VB Code:
Dim vConnection As New SqlConnection(vConnectionString) Dim vAdapter As New SqlDataAdapter("SELECT party_type_code, party_type_name, party_type_imported" & _ " FROM Party_Type" & _ " ORDER BY party_type_name", vConnection) Dim vDataTable As New DataTable() vAdapter.Fill(vDataTable) vAdapter.Dispose() vConnection.Dispose()
On trying to drop the database using the SQL Command "DROP DATABASE PPCABCD2005", I get the error message:
Cannot drop the database 'PPCABCD2005' because it is currently in use ...
However, if I don't execute the above code, I am able to drop it. Why is it so? What is the solution to this problem?




Reply With Quote