Datagridview with two access tables

Dave_e

Member
Joined
Mar 15, 2008
Messages
6
Programming Experience
Beginner
Hi,

I have two Access tables (identical structures but different data) is it possible to pull the two tables together into one single view within a Datagridview?

I'm looking but having no joy.

I've tried the wizard and select both tables, but still no joy.

I'd appreciate it, if someone can point me to the right direction.


Thanks.
 
Hi

Follow the steps:

1. Declare a table, Say TempTB.
2. Suppose the two tables you mentioned, have names T1 & T2.
3. Iterate through rows of T1 and fill TempTmB with those.
4. Similarly, Iterate through rows of T2 and add those to TempTB.
5. At this time, your TempTB will contain all the data.
 
hi,

i have two access tables (identical structures but different data) is it possible to pull the two tables together into one single view within a datagridview?

I'm looking but having no joy.

I've tried the wizard and select both tables, but still no joy.

I'd appreciate it, if someone can point me to the right direction.


Thanks.

VB.NET:
SELECT * FROM a
UNION ALL
SELECT * FROM b
 
Back
Top