Joining tables from 2 datasets

P

Peter

Thanks Alexey

But FJC and SJC declared as DataColumn and not strings. I tried calling the routine with my column names in String but returned me
some mismatch errors.

Peter

Hi

I have found this code very useful for me but I can't managed to use the Join. Can someone show me how can I call the code (i.e.
the syntax) especially for the FJC and SJC ? I don't quite understand how to make the call.

http://weblogs.sqlteam.com/davidm/archive/2004/01/20/748.aspx

Thanks
Peter

If you read the comments below post, you will see

Dim dtJoin As DataTable = _Join.Join(dt1, dt2, "id", "id")

Hope this helps
 
G

Guest

Thanks Alexey

But FJC and SJC declared as DataColumn and not strings.   I tried calling the routine with my column names in String but returned me
some mismatch errors.

Peter,

there is an overload of the Join method with different parameter data
types:

public static DataTable Join (DataTable First, DataTable Second,
string FJC, string SJC)
{
return SQLOps.Join(First, Second, new DataColumn[]{First.Columns
[FJC]}, new DataColumn[]{First.Columns[SJC]});
}
 
P

Peter

Thanks guys.. I will play around but will it affect the codes inside if the variable type changed ?

Peter

Thanks Alexey

But FJC and SJC declared as DataColumn and not strings. I tried calling the routine with my column names in String but returned me
some mismatch errors.

Peter,

there is an overload of the Join method with different parameter data
types:

public static DataTable Join (DataTable First, DataTable Second,
string FJC, string SJC)
{
return SQLOps.Join(First, Second, new DataColumn[]{First.Columns
[FJC]}, new DataColumn[]{First.Columns[SJC]});
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top