| Author |
Message |
jamest85
Joined: 21 Apr 2010 Posts: 4
|
Posted: Fri Apr 30, 2010 8:58 pm Post subject: check if the table is Deselected in .sdc file, using API. |
|
|
Hi:
I created a .sdc file by using "SQL Data Compare" tool, below is part of:
| Code: |
<TableActions type="ArrayList" version="1">
<value version="1" type="SelectTableEvent">
<action>SelectItem</action>
<val>[dbo].[WidgetDescriptions]:[dbo].[WidgetDescriptions]</val>
</value>
<value version="1" type="SelectTableEvent">
<action>DeselectItem</action>
<val>[dbo].[Contacts]:[dbo].[Contacts]</val>
</value>
<value version="1" type="SelectTableEvent">
<action>DeselectItem</action>
<val>[dbo].[WidgetPrices]:[dbo].[WidgetPrices]</val>
</value>
<value version="1" type="SelectTableEvent">
<action>DeselectItem</action>
<val>[dbo].[WidgetPurchases]:[dbo].[WidgetPurchases]</val>
</value>
<value version="1" type="SelectTableEvent">
<action>DeselectItem</action>
<val>[dbo].[WidgetReferences]:[dbo].[WidgetReferences]</val>
</value>
<value version="1" type="SelectTableEvent">
<action>DeselectItem</action>
<val>[dbo].[Widgets]:[dbo].[Widgets]</val>
</value>
</TableActions>
|
As you can see I only want to compare [dbo].[WidgetDescriptions], because it is: SelectItem, other tables are DeselectItem.
My question is: how to get those DeselectItem and then apply: mapping.include = false?
| Code: |
foreach (TableMapping mapping in mappings.TableMappings)
{
//if the table is "DeselectItem", but I don't know how.
mapping.Include = false;
}
|
Thanks a lot.
JT |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6348 Location: Red Gate Software
|
Posted: Mon May 03, 2010 12:56 pm Post subject: |
|
|
Hi James,
I think that you are probably doing the best thing. Mappings are done by recording the things that the user did in the "tables and views" and "object mappings" tabs, so just because there is a "SelectItem" in the project mappings doesn't prevent a later "DeselectItem" from unmapping it.
The only way that you can double-check the user actions is to verify the end-result. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group