on delete cascade while datasynchronisation

Automate and integrate using the SQL comparison API

on delete cascade while datasynchronisation

Postby Authorized_ » Mon Mar 14, 2011 3:06 pm


Sometimes the SDK gives a foreign key error. Because the rows have references to other tables. Which is quite normal.

But is it possible to delete also these foreign rows at once?

Thank you in advance
Posts: 5
Joined: Wed Mar 02, 2011 8:38 am

Postby Brian Donahue » Tue Mar 15, 2011 5:21 pm

Hi Gillian,

I believe you can fix this error easily by using the SqlOptions.DisableKeys option in your EngineDataCompareOptions class. Don't forget to specify this in mappings, session, and SqlProvider classes or you may see inconsistent behavior.

Because SQL Data Compare Engine scripts updates a table at a time, it's necessary to temporarily disable the foreign keys and restore them after the synchronization.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests