Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to compare two tables having columns like
[Licensee],[ENGINENO],[HULLNO],[ENGINETYPE],[OWNER],[YARD],[Spec],[ORDATE],[DLDATE]

one table had modified records

I want to show both tables's record which are modified into gridview.
I am not able to write proper code for it.
Posted
Comments
nilesh sawardekar 23-Jul-14 1:01am    
Please give more explanation by giving example..
aparnaChandras 23-Jul-14 1:29am    
like if one table has
Licensee - Dalian, EngineNO- 361,hullno-23,owner-Mes,yard-alian
and other table has
Licensee - Dalian, EngineNO- 361,hullno-23,owner-Gesco,yard-alian

Here owner is diff.
so i want to show both records into gridview and choose correct record and save into one table
Maciej Los 23-Jul-14 1:41am    
Based on what condition?
aparnaChandras 23-Jul-14 2:36am    
there is no specific condition
Maciej Los 23-Jul-14 2:39am    
Are you joking? There must be at least one condition to define relationship between data!

1 solution

Exactly how you do this is down to you: we have no idea of your UI design or how you want to present this.
But it's not too complex at it's most basic:
Identify records which are different: that's just a case of comparing the row values and only extracting ones that don't match exactly. Sort 'em, loop 'em, compare 'em. Create one or two new tables of the results.
Display the data to the user: Here we can;t help much, as we have no idea how you want this to happen. Two grids is the most obvious way, with the scrolling synched and a "keep this" column - but that's up to you.
Delete the unwanted records.

Sorry if it's vague - but we can'r see your screen, access your HDD or read your mind - so we can;t give specific answers to general questions.
 
Share this answer
 
Comments
aparnaChandras 23-Jul-14 2:57am    
THANKS ALOT
OriginalGriff 23-Jul-14 3:33am    
YOU'RE WELCOME!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900