private void button1_Click(object sender, System.EventArgs e) { frmDialog frmDiag = new frmDialog() frmDiag.ShowDialog(); frmDiag.Dispose(); // always dispose of the form } public frmDialog() { string strConn = "Password=ga;Persist Security Info=True;User ID=sa;Initial Catalog=Northwind;Data Source=MICHAEL"; string strSql = "Select * from mySampTable"; SqlConnection cn = new SqlConnection(strConn); SqlDataAdapter da = new SqlDataAdapter(strSql,cn); DataSet ds = new DataSet(); da.Fill(ds); this.dataGrid2.DataSource = ds.Tables[0]; //cn.Close(); // you shouldn't have to do this the Fill method should both open and close the connection cn.Dispose(); }I don't know if the changes will solve your problem but it is worth a try. Also maybe try to make ds a form member.