예제 #1
0
 /// <summary>
 /// Establishes a connection to the server specified in the Name property.
 /// </summary>
 public void Connect()
 {
     dmoServer = (NativeMethods.ISqlServer) new NativeMethods.SqlServer();
     dmoServer.Bogus_LoginSecure2(this.IntegratedSecurity);
     if (this.IntegratedSecurity == false)
     {
         dmoServer.Connect(Name, Username, Password);
     }
     else
     {
         dmoServer.Connect(Name, null, null);
     }
 }