Closing an open database connection when debugging starts
-
Hi, I'm not sure this problem belongs here, but this is probably just as good a place as any for it. Anyway. I'm working on a solution (written in C#) which uses the SQL Express database. I'm working with it in the Server Explorer, but the problem is that each time I start debugging, I must first manually right-click the connection to the database in the Server Explorer and select "Close Connection". Otherwise I get an error when I try to connect to it using my app (which is a web application, not sure if that matters). Which becomes quite annoying after some time. Is there a way to automatically close the connection when I start debugging? Or do you use some other method altogether? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
-
Hi, I'm not sure this problem belongs here, but this is probably just as good a place as any for it. Anyway. I'm working on a solution (written in C#) which uses the SQL Express database. I'm working with it in the Server Explorer, but the problem is that each time I start debugging, I must first manually right-click the connection to the database in the Server Explorer and select "Close Connection". Otherwise I get an error when I try to connect to it using my app (which is a web application, not sure if that matters). Which becomes quite annoying after some time. Is there a way to automatically close the connection when I start debugging? Or do you use some other method altogether? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
I have never had that problem, or heard of it. You might want to search google. Sounds like a strange bug to me.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
I have never had that problem, or heard of it. You might want to search google. Sounds like a strange bug to me.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Yup, strange indeed. Google didn't give me anything useful, but then again I'm not the best at selecting search terms. Are you using SQL Express? Regards, Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
Yes I am using SQL Express, and vs 2005. Are you using VS 2003? what is the error message you are recieving?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
Yes I am using SQL Express, and vs 2005. Are you using VS 2003? what is the error message you are recieving?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I'm using VS2005 as well. I get the error when I try to open the database in code, and the actual error message is just a simple: "Cannot open database "" requested by the login. The login failed. Login failed for user ''. .Net SqlClient Data Provider" Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!