Connect to SQLserver using SMO

Biswapm
Posted by Biswapm under C# category on | Points: 40 | Views : 1363
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
ServerConnection conn = new ServerConnection();
conn.ServerInstance = servername.Text;
conn.LoginSecure = false;
conn.Login = txtUser1.Text;
conn.Password = txtPassword1.Text;
server1 = new Server(conn);

Comments or Responses

Login to post response