Esempio n. 1
0
        public void connectToDB(string database)
        {
            DBTablesForm form3 = new DBTablesForm(conn, database);

            MessageBox.Show("Connection to Database Successful");
            form3.Show();
        }
Esempio n. 2
0
        public void connectToDB(string database)
        {
            DBTablesForm form3   = new DBTablesForm(database);
            ConnString   connect = new ConnString();

            connect.SetDatabase(database);
            conn = new MySqlConnection();
            if (connection == false)
            {
                conn.ConnectionString = connect.getConnString();
                conn.Open();
                connection = true;
            }
            if (connection == true)
            {
                MessageBox.Show("Connection to Database Successful");
                form3.Show();
            }
        }