private void MaidService_Load(object sender, EventArgs e) { string sql = "SELECT *FROM Registrations WHERE userName='******'"; AccessProperty ap = new AccessProperty(); DataAcess da = new DataAcess(); SqlDataReader reader = da.GetData(sql); while (reader.Read()) { textBox1.Text = Convert.ToString(reader["City"]); GeneralOperations go = new GeneralOperations(); dataGridView1.DataSource = go.GetMaid(); } da.ConnectionClose(); }