public FlightsForm() { InitializeComponent(); mysqlConn = new FlightsDbConn(); mysqlConn.connect(); if (mysqlConn.connOpen() == true) { dataGridView1.DataSource = mysqlConn.qry("SELECT * FROM `tblFlight`").Tables[0]; } mysqlConn.connClose(); }