Itay Tur2,392 Points
how to use the The sql server explorer without getting an exception when running the program
the program runs fine up until i check the database in the server explorer. in this point if i i run the program i get this exception: "System.Data.SqlClient.SqlException: 'Cannot drop database "Books" because it is currently in use.' " while all my models tabs are closed
Close any table or data views open in Visual Studio. Any windows 'in use' can block CRUD operations to your database. If you get this error, then there is a window 'in use' somewhere that needs to be closed.
Marek Ott9,204 Points
Another possible solution of this problem is (after closing all windows as Dale wrote) running VS as an administrator.