private void LoadDatabases() { this.cboDatabases.DataSource = null; List <string> lst = null; this._updateParentForm(true); try { if (this.AuthenticationMode == LogonMode.Windows) { lst = SQLInstancesFinder.GetDatabasesFromServer(cboServer.Text); } else { lst = SQLInstancesFinder.GetDatabasesFromServer(cboServer.Text, txtUserName.Text, txtPassword.Text); } } catch { } finally { this._updateParentForm(false); } this.cboDatabases.DataSource = lst; }
private void LoadServers() { this.cboServer.DataSource = null; this.cboDatabases.DataSource = null; this._updateParentForm(true); List <SQLInstancesFinder.SQLServerInstance> lst = SQLInstancesFinder.GetNetworkSQLServerInstances(); this._updateParentForm(false); this.cboServer.DataSource = lst; this.cboServer.DisplayMember = "ServerInstance"; }