2
我正在使用命名空间的Server
对象。 我怎么能检查它连接成功的服务器,我不能看到有关它的任何财产。检查连接的服务器对象
ServerConnection srvConn = new ServerConnection(server);
// Log in using SQL authentication instead of Windows authentication
srvConn.LoginSecure = false;
// Give the login username
srvConn.Login = serverUserName;
// Give the login password
srvConn.Password = serverPassword;
// Create a new SQL Server object using the connection we created
SqlServer = new Server(srvConn);
我想知道连接是否与我的用户名和密码一致。
感谢您的帮助。