How to join 2 DataTable in a Dataset?
helo, anyone have any idea of how to join two data table through a primary key in a dataset. For more specific, I have a "employee" table and a "user" table in a dataset. Not all employee are users, but user must be employee. Thus, i want only the employee that are users are displayed in the datagrid. I am using VB.Net as my programming language. Thanks in advance.
DATARELATION is the answer ...
mythinky, explore DATARELATION class (in the System.Data namespace). It allows you to create join between tables.
-Cool Bizs
Re: How to join 2 DataTable in a Dataset?
I just finished work on an SQL_Engine that allows you to do exactly what you want.
Joining ADO.Net DataTables http://home.hot.rr.com/graye/Article...TableJoins.htm
In-Memory SQL Engine http://home.hot.rr.com/graye/Articles/SQL_Engine.htm
Re: How to join 2 DataTable in a Dataset?
Have a look at this thread:
http://www.codeguru.com/forum/showth...light=joinview
basically there is a class written by microsoft support which is called JoinView. You can find it here:
http://support.microsoft.com/kb/325682/EN-US/
Re: How to join 2 DataTable in a Dataset?
Hi all,
the in-memory SQL engine is doing a great job (once I got it to run...). :)
There appears to be an error in PARSE.vb (around line 180):
After I replaced:
Code:
If buf = "+" Or buf = "-" Then ' This is WRONG!!!
with:
Code:
If c = "+" Or c = "-" Then
it worked.
I contacted the programmer to verify the solution, but got no response yet. Looks like I didn't produce any new errors, though... :)
Enjoy!
beamer-dreamer