Comments
4 comments
-
Hi Martin,
Thanks for your post.
From the sample examples can you have a look at: GetFeedbackExample.cs
This example reports on SQL Compare's progress by displaying any messages or percentage notifications on the console.
Let me know if this helps. -
Unfortunately, this was not my question. I am currently using feedback, and have no issues with this.
My question was if there is a resumé of commands that have been performed by the Data Compare engine.
For example:
x Records were added to TableX
y Records were deleted from TableX
z Records were updated on TableX
...etc. for each table in the database. -
I have found the solution, and show it here in case in might help other users:
... RedGate.SQLDataCompare.Engine.SqlProvider provider = new RedGate.SQLDataCompare.Engine.SqlProvider(Options); using(RedGate.Shared.SQL.ExecutionBlock.ExecutionBlock block = provider.GetMigrationSQL(session, true)) { foreach(RedGate.SQLCompare.Engine.Message msg in provider.Messages) { // You can get the information about what is going to happen here using the msg.Text property!! } RedGate.Shared.SQL.ExecutionBlock.BlockExecutor executor = new RedGate.Shared.SQL.ExecutionBlock.BlockExecutor(); executor.ExecuteBlock(block, sqlHostTarget, databaseNameTarget); }
Hope this helps,
Martin. -
Hi Martin,
Thanks for posting the solution!
Add comment
Please sign in to leave a comment.
I'm looking for something like:
x Records added to TableX
x Records modified in TableX
x Record deleted from TableY
Thanks,
Martin.