阅读背景:

如何在不打开数据库的情况下测试SqlServer连接

来源:互联网 

The title pretty much says it all. I want to create a SqlConnection and then check that connection without opening a database, cause at that point I don't know yet where will I connect to. Is it possible to do that? The SqlConnection class has a 'Open' member which tries to open the database you'd set in the Database property, and if you didn't set one, SqlServer tries with the master db. The thing is the user I'm trying to connect with (MACHINE\ASPNET) has access to some databases (which I don't know yet) and not the master db.The title pretty much says it all. I want to cr




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: