pubic void FillDataSet(DbDataSet dataSet, string connStr) {
// retrieving data from DEPT table
MySqlDataTable dept = new MySqlDataTable("select * from dept", connStr);
dept.FetchAll = true;
dept.Active = true;
// retrieving data from EMP table
MySqlDataTable emp = new MySqlDataTable("select * from emp", connStr);
emp.FetchAll = true;
emp.Active = true;
// adding data tables to MySqlDataSet
dataSet.Tables.Add(dept);
dataSet.Tables.Add(emp);
// linking tables to allow navigation from parent table rows
// to corresponding child table rows
DataColumn parentColumn = dataSet.Tables["DEPT"].Columns["DEPTNO"];
DataColumn childColumn = dataSet.Tables["EMP"].Columns["DEPTNO"];
DataRelation relation = new System.Data.DataRelation("DeptsEmps",
parentColumn, childColumn);
dataSet.Relations.Add(relation);
}