When executing this code, you should connect to the master database so things don't get weird with the connection.
-George
Microsoft SQL Server MVP My Blogs SQLCop twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
To simply disconnect, you would use the Close() method of the Connection object. This will release the connection back to the connection pool in IIS, or close the connection to SQL for other types of applications.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.