Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialItay Tur
2,392 Pointshow 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
2 Answers
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,350 PointsClose 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 Ott
9,206 PointsAnother possible solution of this problem is (after closing all windows as Dale wrote) running VS as an administrator.