on delete cascade while datasynchronisation

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

on delete cascade while datasynchronisation

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

Hello,

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
Gillian
Authorized_
 
Posts: 5
Joined: Wed Mar 02, 2011 9:38 am

Postby Brian Donahue » Tue Mar 15, 2011 6: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: 6669
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests