Red Gate forums :: View topic - on delete cascade while datasynchronisation
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

on delete cascade while datasynchronisation

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
Authorized_



Joined: 02 Mar 2011
Posts: 5

PostPosted: Mon Mar 14, 2011 4:06 pm    Post subject: on delete cascade while datasynchronisation Reply with quote

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
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Tue Mar 15, 2011 6:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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