Data compare only specified tables
tmz
Posts: 6
Hy!
In .Net application I would like to compare two databases. But not all tables.
How do I specify to compare only tables that I want.
I assume I have to change this code:
But how?
Thanks!
Tomaz
In .Net application I would like to compare two databases. But not all tables.
How do I specify to compare only tables that I want.
I assume I have to change this code:
Tables commonTables=Tables.CreateFromIntersection(db1.Tables, db2.Tables);
But how?
Thanks!
Tomaz
This discussion has been closed.
Comments
You can limit the tables that will be compared by choosing to add or omit them from the TableComparisonSettings collection. Here is an example from the code snippets that come with Toolkit: You will want to insert a conditional inside this loop to only include the tables that you want.
Thanks. I was aware of the if.... condition. But I thought there is a better (more proper) way to do this.
Thank you anyway.
Tomaz
This is the only way I'm aware of. I haven't run across any 'atomic' settings that would help.
But how is it possible to specify which tables to compare in command line utility?
I supose the same core is used.
Tomaz
Yes. I know. That's what I'm saying.
Tomaz
Aha. Now I get it. Thank you.
Tomaz