pubic void FillDataSet(DbDataSet dataSet, string connStr) {
// retrieving data from DEPT table
PgSqlDataTable dept = new PgSqlDataTable("select * from dept", connStr);
dept.FetchAll = true;
dept.Active = true;
// retrieving data from EMP table
PgSqlDataTable emp = new PgSqlDataTable("select * from emp", connStr);
emp.FetchAll = true;
emp.Active = true;
// adding data tables to PgSqlDataSet
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);
}