示例#1
0
 public void MsSQLServerConnected(MsSQLServerConnection _msc)
 {
     msc = _msc; chkMsSQLServer.Checked = true;
     showTablesToolStripMenuItem.Enabled  = true;
     findColumnsToolStripMenuItem.Enabled = true;
     GUIUpdateConnected(msc.Host);
 }
        private void Proceed()
        {
            msc = new MsSQLServerConnection(txtUserName.Text, txtPassword.Text, txtServer.Text, txtDBName.Text);

            try { msc.OpenConnection(); }
            catch (Exception ex) { MessageBox.Show("Database Connection Failed\n" + ex.ToString()); return; }
            main.MsSQLServerConnected(msc);
            this.Close();
        }
示例#3
0
        private void disconnect()
        {
            try { jc.CloseConnection(); }
            catch (Exception) { }

            try { mc.CloseConnection(); }
            catch (Exception) { }

            try { lc.CloseConnection(); }
            catch (Exception) { }

            try { msc.CloseConnection(); }
            catch (Exception) { }

            jc = null; mc = null; lc = null; msc = null;
        }