Re: How to join two tables.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET"
http://support.microsoft.com/default.aspx?scid=kb;en-us;326080

SUMMARY
This step-by-step article describes how to implement and how use a
DataSetHelper class that includes sample code to create a DataTable object
from two or more related DataTable definitions and to copy records that are
sorted and filtered from the source DataTable objects to the destination
DataTable.

- Conan

"Speed" <pavankumar.thiru@xxxxxxxxx> wrote in message
news:1125146542.696676.131130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> i have two tables as follows:
>
> first table:
>
> Id Name Age
> 2 ABC 21
> 3 XYZ 22
>
> second table:
>
> Id Salary Exp
> 2 10000 2
> 3 20000 5
>
> The Id columns in both the tables being the primary keys.
> and wat i want is
>
> Id Name Age Salary Exp
> 2 ABC 21 10000 2
> 3 XYZ 22 20000 5
>
> is this possible? I tried using dataset.Merge and binding dataset to
> the datagrid to display the final table, but with no success.
> any pointers to this will be greatly appreciated.
>


.