Thursday, May 31, 2007

DataSet.Merge or DataSet.Relations

1. For rows - columns merge - use DataSet.Merge
2. For Master-Detail (Primary key - foreign key) table relations - use DataSet.Relations
3. If you want to join two datatables based on some condition and display columns from both the tables, you have to manually find the key value by "for" loop and then create a new dataset..

For example if you take employee table from sql database and department from oracle database and you want to display empno, empname, deptid, deptname in one single table...manual binding is easier way.

No comments: